Skip to content

Extract a shared popover controller for dropdown, listbox, and combobox - #41

Open
ukutaht wants to merge 8 commits into
mainfrom
refactor/shared-popover-controller
Open

ukutaht wants to merge 8 commits into
mainfrom
refactor/shared-popover-controller

Conversation

@ukutaht

@ukutaht ukutaht commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Dropdown, listbox, and combobox duplicated popup positioning, dismissal, and focus handling. Extract a shared internal popover controller so all three use consistent open state, ARIA/inert updates, focus return on dismissal, and Floating UI positioning. Selection and option navigation remain in the component hooks.

  • Tab and Shift+Tab dismiss the popup and continue focus navigation. Combobox dismissal discards unfinished search while preserving committed selections.
  • Reuse delegated listeners across LiveView updates and batch combobox selection updates.
  • Replace match_trigger_width with --reference-width, available to all three components and measured from the configured reference. Use min-w-[var(--reference-width)] for the previous minimum-width behavior or w-[var(--reference-width)] for an exact match. Listbox width matching now requires CSS; examples and documentation are updated.
  • Consolidate shared lifecycle tests and add coverage for CSS sizing, resizing, and custom references.

This branch has not been deployed

No deployments
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.

1 participant