Skip to content

[do not merge] Search UX v2 #3: active filter chips & multi-select#663

Draft
hoyla wants to merge 1 commit intoljh-searchux-v2-pr2-shared-utilitiesfrom
ljh-searchux-v2-pr3-active-filter-chips
Draft

[do not merge] Search UX v2 #3: active filter chips & multi-select#663
hoyla wants to merge 1 commit intoljh-searchux-v2-pr2-shared-utilitiesfrom
ljh-searchux-v2-pr3-active-filter-chips

Conversation

@hoyla
Copy link
Copy Markdown
Contributor

@hoyla hoyla commented Apr 3, 2026

Context

Part of the Search UX Improvements epic. Closes #636.

Important

This is the third of five PRs in the Search UX Improvements epic.

PR1 Chip parsing infrastructure
 └─ PR2 Shared utilities & Downshift dependency
     └─ PR3 Active filter chips & multi-select  ← you are here
         └─ PR4 Search page & AddFilterModal
             └─ PR5 Sidebar tri-state filters

Changes to the user experience

No visible changes yet — these components are built but not wired into the search page until PR4.

What's included

  • ActiveFilterChip (ActiveFilterChip.tsx) — interactive pill component supporting three chip kinds (single-value, multi-value, date-range), with in-place text editing, negate toggling, dormant/active states, and a multi-select dropdown for multi-value chips.
  • ActiveFiltersBar (ActiveFiltersBar.tsx) — container that renders active chips or dormant defaults (Dataset, Workspace, Date Range, File Type) with a "More filters" button.
  • MultiSelectDropdown (MultiSelectDropdown.tsx) — Downshift-powered multi-select dropdown with keyboard navigation, ARIA attributes, and keep-open-on-select behaviour.
  • MIME type options (mimeTypeOptions.ts) — 17 MIME type options with friendly labels (PDF, Word, Excel, Email, etc.).
  • SCSS (_active-filters.scss) — styling for chips and the filter bar.

Automated tests

  • ActiveFilterChip.spec.ts — tests for isMultiValueChip (6 positive cases, 3 negative cases) and truncateChipDisplay utility.

Manual tests

No visible changes to test.

@hoyla hoyla added feature Departmental tracking: work on a new feature ⚠️ do not merge labels Apr 3, 2026
@hoyla hoyla changed the title Search UX v2 #3: active filter chips & multi-select [do not merge] Search UX v2 #3: active filter chips & multi-select Apr 4, 2026
@hoyla hoyla force-pushed the ljh-searchux-v2-pr2-shared-utilities branch from 6b54f1a to a0e965e Compare April 9, 2026 09:48
Add ActiveFilterChip — functional component rendering a segmented
filter chip with name, value editor, negate toggle, and remove
button. Supports single-value, multi-value, and date range chips
in both active and dormant (prompt) states.

Add ActiveFiltersBar — renders active filter chips and dormant
defaults (Dataset, Workspace, Date Range, File Type) as prompts
when no filters are active. Includes a 'More filters' button for
the AddFilterModal (wired in a later PR).

Add MultiSelectDropdown — powered by Downshift's useSelect hook
which handles keyboard navigation, ARIA attributes, and focus
management automatically. Replaces ~100 lines of custom keyboard
handling with Downshift's stateReducer pattern to keep the menu
open after selection (multi-select behaviour).

Widen SuggestedField.options and chip options types to accept both
string[] and {value, label}[] shapes for consistency between
sidebar-derived and hardcoded option sources.

Add SCSS for active filter chip styling and multi-select dropdown.
@hoyla hoyla force-pushed the ljh-searchux-v2-pr3-active-filter-chips branch from e16147c to 0a8ff34 Compare April 9, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚠️ do not merge feature Departmental tracking: work on a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant