-
-
Notifications
You must be signed in to change notification settings - Fork 548
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
[5.x] Ability for relationship/entries fieldtype to add "hints" #10447
Conversation
@jackmcdade, what this is doing is adding the hints to the right hand side of the dropdown options, like this: But now I need to figure out what to do about the selected items: When you have it in stack mode, you already got those hints: Should we just reuse those? You'd also get status icons and ability to inline-edit the items for free too. |
Yeah i think using RelationShip items could work – I've been wanting to give those a UI update for a while now too. If they use the same component, they'd get an update for free too 🤘 |
Its a copy of the "Entry" resource, but with just the keys necessary. It also has the hint.
I've updated the description of the PR with more detail and screenshots. |
Probably closes or half closes: statamic/ideas#559 |
@johncarter- I've just applied the hint treatment to the terms fieldtype so now this PR can completely close that issue. Thanks for pointing it out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it. I have some ideas for some UI improvements but they are broader, more generic, and cosmetic only. This a big UX win. Let’s ship it!
This PR adds the ability for the relationship fieldtype to display "hints".
Hints are necessary when you have multiple options that could have the same value. For example if you have two entries in different collections with the same title, you don't know which is which:
The entries fieldtype already had this solved when in "stacked" mode because the collection is displayed as a column in the listing as well as having the collection title as a hardcoded hint in the selected item.
This PR makes the concept of these hints more generic across relationship fieldtypes.
This PR also improves the dropdown modes (select and typeahead) by adding hints and status icons to the dropdown options:
Lastly, this PR makes the selected items of the dropdown mode consistent with stacked mode:
Aside from a consistent UI, this allows the dropdown mode to have inline editing by clicking the item titles.
Replaces / Fixes #9749
Closes statamic/ideas#559
Allows #9229 to display the site name as part of the hint.