Skip to content

feat(query-bar): Filter chip component: validation, keyboard interactions, and overflow behavior [AS-638]#37

Open
pigarevaoks wants to merge 7 commits intomainfrom
feature/filter-attacks-components-oks
Open

feat(query-bar): Filter chip component: validation, keyboard interactions, and overflow behavior [AS-638]#37
pigarevaoks wants to merge 7 commits intomainfrom
feature/filter-attacks-components-oks

Conversation

@pigarevaoks
Copy link
Collaborator

Summary

  • Add operator symbol Kbd badges and type-specific labels to the operator menu (e.g. string: "is", "like"; date: "after", "on or after")
  • Support options: string[] shorthand on FieldMetadata for simple value lists
  • Support options: [] for freeform custom value input (no dropdown, Space/Enter commits)
  • Set operator menu width to 256px

Test plan

  • Verify operator menu shows correct labels per field type (string, integer, date, boolean, enum)
  • Verify Kbd symbol badges appear for all types except boolean
  • Verify options: ['GET', 'POST', ...] renders value dropdown correctly
  • Verify options: [] (freeform) skips value dropdown, Enter/Space creates chip
  • Run pnpm --filter design-system exec tsc --noEmit — no errors
  • Run pnpm --filter design-system test — all tests pass

🤖 Generated with Claude Code

pigarevaoks and others added 6 commits March 11, 2026 14:40
Complete implementation of the QueryBar component for building filter expressions:

- Progressive chip building flow: field → operator → value
- Inline segment editing (click attribute/operator/value to edit in-place)
- Multi-select value editing with dropdown checkboxes
- AND/OR logical connectors between conditions
- Date field support with calendar picker and range selection
- Keyboard navigation (ArrowUp/Down, Enter, Escape, ArrowRight, Cmd+Arrow multi-select)
- Fuzzy sort for field and value dropdown menus
- Insertion gaps for adding conditions between existing chips
- Error validation for unknown fields and invalid values
- Comprehensive E2E and unit tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…av and chip editing

- Remove duplicate WithFooter story in DropdownMenu
- Improve keyboard navigation in QueryBar menus
- Fix chip editing flow and value menu state handling
- Update QueryBar e2e tests
- Clean up index exports

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…rator menu

- Update OPERATOR_LABELS_BY_TYPE for all field types (string, integer, float, date)
- Add operator symbol Kbd badges to operator menu items (hidden for boolean)
- Support custom operators list from FieldMetadata via operators prop
- Set operator menu width to 256px per Figma spec

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Support `options: string[]` on FieldMetadata as shorthand for simple
values and `options: []` for freeform custom value input. Space key
also commits freeform values (same as Enter).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

This PR is included in version 0.10.0-rc-feature-filter-attacks-components-oks.1

@pigarevaoks pigarevaoks changed the title feat(query-bar): add operator symbols, type labels, and freeform value input feat(query-bar): Filter chip component: validation, keyboard interactions, and overflow behavior [AS-638] Mar 12, 2026
…ning and menu flow

- Enforce single-dropdown constraint: connector chip and autocomplete
  menu cannot be open simultaneously
- Decompose useQueryBarAutocomplete into focused sub-hooks:
  useFocusManagement, useInputHandlers, valueCommitHelpers
- Fix dropdown Y-axis and X-axis positioning when inserting between chips
- Use flushSync for menu repositioning on gap clicks and chip completion
- Add continueBuilding parameter to resetState to prevent unwanted menu opens
- Fix deriveAutocompleteValues to use getFieldValues instead of raw values
- Memoize operatorGroups, extract constants, simplify value commit logic
- Add building chip wrapper with border styling and inline input

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

This PR is included in version 0.10.0-rc-feature-filter-attacks-components-oks.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant