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

[4.x] Add collection title to select field #9749

Open
wants to merge 2 commits into
base: 4.x
Choose a base branch
from

Conversation

martyf
Copy link
Contributor

@martyf martyf commented Mar 18, 2024

When you use the Entries fieldtype, and configure it to use multiple specific Collections, the list of Entries returned has no reference to what Collection they are from.

For example, if your site has multiple "sections", each within their own Collection, and each that have an "About" page, the Select box would show:
image

This is not useful to an author.

You can work around this using the Stack view, but is not as elegant (and requires more clicks).

This PR adds a span if the field is configured to have more than one Collection, and the Collection data exists:
image

If you do not configure specific Collections to use, there is no change.
If you only have a single specific Collection, there is no change.

This only kicks in when you have multiple Collections configured, or the options array has data for more than one Collection, and is ideal for single selection only.

This does raise some questions about bigger picture UX though.

When "Select" and max of 1, the option that appears in the select box when chosen does not have Collection data.
When "Select" and multiple allowed, the items array does not include Collection data.

So while this PR improves UX for selection, there is still room to grow further for multiple selections.

Adds the collection title to the select dropdown when the field is configured for multiple collections.
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.

None yet

1 participant