Skip to content

refactor(filter): use PolarInput#810

Open
dopenguin wants to merge 7 commits into
nextfrom
refactor/polar-input
Open

refactor(filter): use PolarInput#810
dopenguin wants to merge 7 commits into
nextfrom
refactor/polar-input

Conversation

@dopenguin

@dopenguin dopenguin commented Jun 18, 2026

Copy link
Copy Markdown
Member

Summary

Replaces layout-conditional checkbox/radio components (KernBlockButtonCheckbox, KernCheckbox, KernBlockButtonRadioGroup, KernRadioGroup) in filter with the unified PolarInput component (as proposed in #734).
Simplifies category state from Record<string, boolean> to string[] and introduces a reactive getter/setter-based selection model on categories for direct v-model binding and to get rid of getCategoryStatus and setCategoryStatus.

Also added some small changes to PolarInput and PolarInputGroup.

Instructions for local reproduction and review

  1. npm run snowbox
  2. Open filter
  3. Verify category checkboxes can be toggled individually and via "Alle an-/abwählen"
  4. Verify the 1xx multi-value category entry correctly selects/deselects with its individual values (100, 101, 102)
  5. Verify time filter works
  6. Verify the date range picker scrolls into view when "Zeitraum wählen" is selected and selection works

Additional information

I intend to update the implementation in src/plugins/filter/stores/category.ts (a) and src/plugins/filter/stores/time.ts (#811) as well.
For (a): Currently, if a user switches between two layers, the filter state of the the previous layer is reset. This is odd from a usability perspective. If you agree, I'll change this in a separate PR so that the state stays even if the layer switches.

Tickets

Resolves #779

The differentiation between the interface for layout standard and nineRegions including the
components KernCheckbox and KernBlockButtonCheckbox has been removed.

This change includes a refactor of the store and its logic to work without much overhead
together with PolarInput.
The differentiation between the interface for layout standard and nineRegions including the
components KernRadioGroup and KernBlockButtonRadioGroup has been removed.
@dopenguin dopenguin added this to the POLAR@3 milestone Jun 18, 2026
@dopenguin dopenguin self-assigned this Jun 18, 2026
@dopenguin dopenguin requested a review from a team June 18, 2026 17:08
@dopenguin dopenguin requested a review from warm-coolguy as a code owner June 18, 2026 17:08
@dopenguin dopenguin added the refactor Refactoring of previous code label Jun 18, 2026
@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://Dataport.github.io/polar/pr-preview/pr-810/

Built to branch gh-pages at 2026-06-30 11:46 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

# Conflicts:
#	src/plugins/filter/components/FilterCategory.ce.vue
# Conflicts:
#	src/components/kern/KernBlockButtonCheckbox.ce.vue
#	src/components/kern/KernBlockButtonRadioGroup.ce.vue
#	src/components/kern/KernRadioGroup.ce.vue
#	src/plugins/filter/stores/category.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Refactoring of previous code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace KernBlockButton inputs with PolarInput and PolarInputGroup

1 participant