Skip to content

Add popover mode to FilterChooser; deprecate PopoverFilterChooser (#4084)#4457

Merged
lbwexler merged 5 commits into
developfrom
4084-filter-chooser-popover-mode
Jul 1, 2026
Merged

Add popover mode to FilterChooser; deprecate PopoverFilterChooser (#4084)#4457
lbwexler merged 5 commits into
developfrom
4084-filter-chooser-popover-mode

Conversation

@lbwexler

Copy link
Copy Markdown
Member

Closes #4084.

Folds the popover behavior into FilterChooser as a first-class popover mode backed by a single real select, replacing the PopoverFilterChooser wrapper's duplicate-control design (two filterChoosers sharing one inputRef, an omit hack, and a disabled target) that was the root cause of all three reported symptoms.

What changed

  • filterChooser({popover: true}) renders the control collapsed in-place and expands it into a popover when opened. New popover?: boolean | FilterChooserPopoverOptions prop (position, width).
  • Only the interactive instance binds model.inputRef, so the collapsed trigger and expanded content mount together without contention - no more omit.
  • The trigger is made non-interactive via react-select menuIsOpen/isSearchable instead of disabled, keeping its clear and favorites controls live. The expand popover skips opening on clicks that land on those controls (elemWithin), and favorites is gated so only one menu shows at a time.
  • PopoverFilterChooser is now a thin @deprecated alias delegating to filterChooser({popover: true}); to be removed in a future major.

Fixes

  • Collapsed control no longer disappears on open - surrounding layout no longer shifts.
  • Clear and favorites are now single-click from the collapsed state.

Migration

  • Admin ActivityTrackingPanel and RolePanel updated to the new mode.

Verifying behavior in the browser before marking ready for review.

)

Folds the popover behavior into FilterChooser as a first-class `popover` mode
backed by a single real `select`, replacing the PopoverFilterChooser wrapper's
duplicate-control design (two filterChoosers sharing one inputRef, an `omit`
hack, and a `disabled` target) that caused all three reported symptoms:

- The collapsed trigger now always occupies its space, so surrounding layout no
  longer shifts when the popover opens.
- The trigger's clear and favorites controls respond to a single click rather
  than first requiring the popover to be opened.

Only the interactive instance binds `model.inputRef`, so trigger and content can
mount together without contention. The trigger is made non-interactive via
react-select `menuIsOpen`/`isSearchable` rather than `disabled`, keeping its
clear/favorites affordances live; the expand popover skips opening on clicks
that land on those controls.

PopoverFilterChooser is now a thin @deprecated alias delegating to
`filterChooser({popover: true})`. Admin panels migrated accordingly.
@lbwexler lbwexler marked this pull request as ready for review June 30, 2026 15:29
@lbwexler lbwexler requested review from TomTirapani and amcclain June 30, 2026 15:30

@TomTirapani TomTirapani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - great change 👍

Comment thread desktop/cmp/filter/PopoverFilterChooser.ts
@lbwexler lbwexler merged commit 66b2d3f into develop Jul 1, 2026
3 checks passed
@lbwexler lbwexler deleted the 4084-filter-chooser-popover-mode branch July 1, 2026 21:16
@amcclain

amcclain commented Jul 6, 2026

Copy link
Copy Markdown
Member

Clear and favorites are now single-click from the collapsed state.

Nice pickup on this one, thanks for the improvement!

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.

popoverFilterChooser target does not occupy space when open

3 participants