Conversation
The dropdown items list only knew a flat list, so admin-ui kept the
legacy dropdown for every ChoiceType with optgroups. Entries may now be
plain items or {label, items} groups: the panel renders a non-interactive
group header (role=group, aria-labelledby) with its items nested, the
source select emits matching optgroups, search keeps a group while one of
its items matches and shows a no-results row otherwise, and keyboard focus
walks leaf items only. Rendering moved into an ItemsList sub-component so
ItemsContainer stays within the file size limit.
Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related PRs:
IBX-12475-dropdown-base(IBX-12330: Updated dropdown styling #141 replayed onto the current IBX-12256: Fix multi dropdown rendering in narrow containers #139 head, pushed separately so the branches under QA stay untouched) — only the top commit belongs to this PR. Retarget tomainonce both merge.Description:
DropdownSingleInput/DropdownMultiInputaccept option groups: anitemsentry may be{ label, items, id? }. A group renders as a non-interactive header (role="group"+aria-labelledby) with its items nested below, the source<select>emits matching<optgroup>s, search keeps a group while one of its items matches and shows "No results found" otherwise, and keyboard focus walks leaf items only. Item rendering moved into anItemsListsub-component; no new props.There is no design for grouped items yet — header 14/600 on a 32px row, 16px indent, +4px before a header and no divider are proposals for designer review.
For QA:
Storybook → Dropdown Single / Multi → the "Grouped" stories: headers cannot be focused, ArrowDown/Up skip them, typing hides groups without matches, a nonsense term shows "No results found". In the back office (with the twig + admin-ui PRs): Roles → a role → Policy create → "Choose a Policy".
Documentation: