Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add display options for repeater #19703

Merged
merged 7 commits into from
Sep 25, 2023
Merged

Add display options for repeater #19703

merged 7 commits into from
Sep 25, 2023

Conversation

Nitwel
Copy link
Member

@Nitwel Nitwel commented Sep 15, 2023

closes #19692

Adds options for specifying a display on the repeater interface.

grafik

@changeset-bot
Copy link

changeset-bot bot commented Sep 15, 2023

🦋 Changeset detected

Latest commit: f8e2122

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@directus/app Minor
@directus/api Patch
directus Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Nitwel Nitwel requested review from a team, br41nslug, jaads and azrikahar and removed request for a team September 15, 2023 14:08
@Nitwel Nitwel self-assigned this Sep 15, 2023
Copy link
Member

@paescuj paescuj left a comment

Choose a reason for hiding this comment

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

Nice work 🚀

I think we should make the UI a bit clearer, otherwise the user might be overwhelmed:

  • Rename "Options" to "Interface Options" for a clear separation between interface and display options
  • Maybe add a horizontal rule
  • Rename "Display Label" to "Display", just like we use "Interface" above

Screenshot 2023-09-18 at 09-26-25 Directus

@Nitwel
Copy link
Member Author

Nitwel commented Sep 18, 2023

Good points, instead of using a divider, I think using a group to hide the display options might help with the clutteredness.

jaads
jaads previously requested changes Sep 19, 2023
Copy link
Member

@jaads jaads left a comment

Choose a reason for hiding this comment

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

under "display options", I assume it should say "select an display" instead of "select an interface"
Screenshot 2023-09-19 at 10 44 12

@jaads
Copy link
Member

jaads commented Sep 19, 2023

it would be nice to also have the docs updated in this PR, right? 🤔

@jaads
Copy link
Member

jaads commented Sep 19, 2023

I think using a group to hide the display options might help with the clutteredness.

would it be possible to group interface and interface options together as well? 🤔

@jaads
Copy link
Member

jaads commented Sep 19, 2023

is "raw value" missing under "display label"? I would have expect it there since it's also an option when changing the display type after the field got created

@Nitwel
Copy link
Member Author

Nitwel commented Sep 20, 2023

Updated it to use groups for interface options. Interface group is open by default while display group is cloded by default.

grafik

@Nitwel
Copy link
Member Author

Nitwel commented Sep 20, 2023

is "raw value" missing under "display label"? I would have expect it there since it's also an option when changing the display type after the field got created

It is the default display anyways to just unselecting any display is the same as selecting the raw display.

@Nitwel
Copy link
Member Author

Nitwel commented Sep 20, 2023

it would be nice to also have the docs updated in this PR, right? 🤔

Oh, didn't knew we had docs on this. Will update them!

@jaads jaads self-requested a review September 20, 2023 10:31
Copy link
Member

@jaads jaads left a comment

Choose a reason for hiding this comment

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

so I have created a repeater (field/column is calledsomething) with two fields called first and second. the interface works fine. I can add data to those two fields. I created one item, this it how it looks in in the database: [{"first":"one","second":"two"}].

I did not specify any display. I would expect the studio to show me the raw data like above but is doesn't. instead it shows me the value of the first field, which is one here.
Screenshot 2023-09-20 at 14 19 12

@Nitwel
Copy link
Member Author

Nitwel commented Sep 21, 2023

If you don't specify any display template, by default it will fallback to the first field I'm pretty sure. So that is as to be expected.

Copy link
Member

@paescuj paescuj left a comment

Choose a reason for hiding this comment

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

Awesome work, @Nitwel! Works & looks great! ❤️

@paescuj paescuj merged commit c59fc8f into main Sep 25, 2023
7 checks passed
@paescuj paescuj deleted the fix-19692 branch September 25, 2023 13:02
@github-actions github-actions bot added this to the Next Release milestone Sep 25, 2023
br-rafaelbarros pushed a commit to personal-forks/directus-source that referenced this pull request Nov 7, 2023
Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Jan Arends <jan.arends@mailbox.org>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repeater field could display Text on interface instead Value for select dropdown
4 participants