Skip to content

[DT-2692] feat: pick content relationship fields#1634

Merged
jomifepe merged 26 commits into
jp/cr-ui-basefrom
jp/cr-ui
May 30, 2025
Merged

[DT-2692] feat: pick content relationship fields#1634
jomifepe merged 26 commits into
jp/cr-ui-basefrom
jp/cr-ui

Conversation

@jomifepe

@jomifepe jomifepe commented May 26, 2025

Copy link
Copy Markdown
Collaborator

Relates to: DT-2692

Description

When adding or editing a new field, have the ability to go through all the available fields from any custom type in the library and pick multiple.

Currently, it's only possible to pick fields from the first level, and we plan to implement two levels. Picking fields from the second level will be implemented in a different PR.

Preview

Screenshot 2025-05-27 at 18 40 21

cr-field-picker.mp4

How to QA 1

  1. Launch slice-machine in this branch
  2. Add a new Content Relationship field to any page/custom type
  3. Use the new TreeView picker (as seen in the preview above)

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

@jomifepe jomifepe self-assigned this May 26, 2025
@linear

linear Bot commented May 26, 2025

Copy link
Copy Markdown

@vercel

vercel Bot commented May 26, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
slice-machine ✅ Ready (Inspect) Visit Preview May 30, 2025 4:24pm

@jomifepe jomifepe changed the title [DT-2692] feat: pick fields when adding/editing a Content Relationship [DT-2692] feat: pick content relationship fields May 27, 2025
@lihbr

lihbr commented May 28, 2025

Copy link
Copy Markdown
Member

Is it necessary to display/allow selecting the uid? It's always returned by the API and is not part of the data object: https://200629-sms-hoy.cdn.prismic.io/api/v2/documents/search?q=%5B%5Bat%28document.type%2C+%22kitchen_sink_4%22%29%5D%5D&ref=aDbsjxEAACwAkpaF&fetchLinks=post.title

@jomifepe

jomifepe commented May 28, 2025

Copy link
Copy Markdown
Collaborator Author

Is it necessary to display/allow selecting the uid? It's always returned by the API and is not part of the data object: https://200629-sms-hoy.cdn.prismic.io/api/v2/documents/search?q=%5B%5Bat%28document.type%2C+%22kitchen_sink_4%22%29%5D%5D&ref=aDbsjxEAACwAkpaF&fetchLinks=post.title

That's a great point! Just double checked this with the team and it should in fact be omitted.

Nice catch! Done ✅

@xrutayisire xrutayisire left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is my initial review! UI looks super nice and aligned with design! ✨

…RelationshipFieldPicker.tsx

Co-authored-by: Xavier Rutayisire <xavier.rutayisire@gmail.com>

@xrutayisire xrutayisire left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

@jomifepe jomifepe merged commit 9cc5ea1 into jp/cr-ui-base May 30, 2025
33 checks passed
@jomifepe jomifepe deleted the jp/cr-ui branch May 30, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants