Skip to content

✨(filters) add subContent in options#261

Open
NathanVss wants to merge 3 commits into
mainfrom
feat/menu-custom-elements
Open

✨(filters) add subContent in options#261
NathanVss wants to merge 3 commits into
mainfrom
feat/menu-custom-elements

Conversation

@NathanVss

@NathanVss NathanVss commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

What

A Filter option can now declare subContent — it renders with a chevron and opens a
hover sub-panel hosting any component. Showcase: an "Updated" filter whose Custom
option opens a cunningham CalendarRange.

Notes

  • Sub-content rows open on hover; clicking them is ignored (no select/close).
  • Checkmark now uses the ListBoxItem isSelected render prop (the collection pass
    doesn't have resolved Select state, so reading context was unreliable).
  • Migrated off deprecated react-aria props: selectedKey/defaultSelectedKey/
    onSelectionChangevalue/defaultValue/onChange (old props still pass through).
  • Added e2e tests
CleanShot 2026-06-23 at 17 25 53

@NathanVss NathanVss force-pushed the feat/menu-custom-elements branch 2 times, most recently from 7da70c2 to 853e530 Compare June 24, 2026 08:54
An option can now declare a `subContent` panel: the row renders a chevron and
opens (on hover or keyboard) a sub-panel hosting any component, e.g. a date
range picker, with `select` / `close` helpers to drive the parent selection.

Selection is read from the ListBoxItem `isSelected` render prop (the collection
pass has no SelectStateContext), and the component uses the value-based Select
API (value / onChange / setValue) since selectedKey / selectedItem are now
deprecated by react-aria.
Showcase the `subContent` API with an "Updated" filter whose Custom option
opens a CalendarRange, plus a Reset button. Document the option and prop API
and switch the examples to the non-deprecated value / defaultValue / onChange
selection props.
Playwright component tests (with a browser-side mount helper, since CT can't
pass render props from the spec) covering selection, the selected-option
checkmark, the chevron affordance, hover- and keyboard-opening of the
sub-panel, the click-is-ignored behaviour, range confirm / cancel, and reset.
@NathanVss NathanVss force-pushed the feat/menu-custom-elements branch from 853e530 to d20cbd6 Compare June 24, 2026 09:31
@NathanVss NathanVss requested a review from PanchoutNathan June 24, 2026 09:31
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