Skip to content

feat: add filter popover component#25

Merged
felipeospina21 merged 1 commit into
mainfrom
feat/filter-popover
Apr 24, 2026
Merged

feat: add filter popover component#25
felipeospina21 merged 1 commit into
mainfrom
feat/filter-popover

Conversation

@felipeospina21
Copy link
Copy Markdown
Owner

Summary

Add a reusable multi-select filter popover to the popover package. Supports checkbox sections (multi-select) and text input fields in a single overlay.

Changes

  • messages.go — Added FilterSection, FilterOption, FilterInput types and OpenFilterPopoverMsg, CloseFilterPopoverMsg, ApplyFilterPopoverMsg messages
  • popover/filter.goFilterModel with tab/shift+tab field navigation, j/k within sections, space toggle, dynamic help line
  • popover/examples/filter/ — Example app demonstrating the component

Design

  • Checkbox sections in 2-column grid, text inputs below
  • Tab cycles all fields (sections + inputs); key routing switches based on field type
  • PrimaryBright for focused items, Primary for unfocused
  • Fixed-size help line to prevent popover resizing on focus change
  • ApplyFilterPopoverMsg carries both Selections map[string][]string and Inputs map[string]string

Testing

  • make build and make test pass
  • Manual testing via example app

Add FilterModel to the popover package — a reusable overlay component
with checkbox sections and text input fields. Navigation uses tab/
shift+tab between fields, j/k within sections, space to toggle.

- FilterSection/FilterOption/FilterInput types in messages.go
- Open/Close/Apply message types for consumer integration
- Dynamic help line based on active field type
- 2-column grid layout for checkbox sections
- PrimaryBright for focused items, Primary for unfocused
- Example app in popover/examples/filter/
@felipeospina21 felipeospina21 merged commit 82e7abf into main Apr 24, 2026
2 checks passed
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