feat(Filter): new component (revived from dev-plan-checklist) - #481
Draft
IgorShevchik wants to merge 7 commits into
Draft
feat(Filter): new component (revived from dev-plan-checklist)#481IgorShevchik wants to merge 7 commits into
IgorShevchik wants to merge 7 commits into
Conversation
Plan, spec, and morning checklist for the upcoming Filter component. No code yet — implementation starts after review. https://claude.ai/code/session_012S8FTBQd7v2E5nG868nxLh
Adds FilterFieldType, FilterOperator, FilterFieldConfig, FilterFieldCondition (discriminated union), FilterValue, FilterDateValue, FilterPreset, FilterBarTag, and FilterLocale in src/runtime/types/filter.ts, plus operator type-guard helpers in src/runtime/utils/filter.ts. https://claude.ai/code/session_012S8FTBQd7v2E5nG868nxLh
Adds the composite Filter component modelled after the native Bitrix24 filter: - Filter.vue: public root, orchestrates state, adaptive Popover/Drawer via useDevice, auto-applies a pinned preset on first load. - FilterBar.vue: search input + chips (preset / condition / counter +N), trailing search/clear/settings buttons, debounced search. - FilterPanel.vue: layout container. - FilterPresets.vue: list with active state, system-preset gating, inline rename/save, DnD reordering, keyboard reorder via menu. - FilterFieldsEditor.vue: active field list, add via CommandPalette popover, reset defaults, Find / Reset actions. - FilterField.vue: per-type controls (string, number, money, date, time, select, multiselect, boolean) + custom-type slot, filled/empty operator hides the value control. - FilterSortableList.vue: thin wrapper over @vueuse/integrations/useSortable. - Theme src/theme/filter.ts with slots for the full anatomy. - defaultFilterLocale in src/runtime/locale/filter.ts (Russian defaults). - Utility helpers in utils/filter-format.ts (conditionLabel). - Registered in ThemeDefaults and theme index. https://claude.ai/code/session_012S8FTBQd7v2E5nG868nxLh
- test/components/Filter.spec.ts: 14 cases — renderEach snapshot grid + emit apply payload, reset semantics, unknown-field filtering, unknown-operator drop, auto-pin on first mount, imperative API. - docs/content/docs/2.components/filter.md: usage, presets, field types, custom-type slot, adaptive layout, operators, date values, DnD, locale, imperative API, props/emits/slots reference, security notes. - playgrounds/nuxt/app/pages/components/filter.vue: interactive demo with 6 fields (incl. custom user picker via slot), 3 system presets, all main controls. - skills/b24-ui-nuxt/references/components.md: B24Filter entry. Lint and typecheck included. Tightens emit typings to tuple form to satisfy @typescript-eslint/unified-signatures, swaps a few inline `as T | undefined` casts in templates for computeds to avoid vue/no-deprecated-filter parse, and replaces dynamic `delete` with object-rebuild for no-dynamic-delete. https://claude.ai/code/session_012S8FTBQd7v2E5nG868nxLh
- Merge filter-component-spec.md + filter-component-plan.md into a single filter-component.md (Russian, spec → plan order). - Replace the morning checklist with filter-implementation-notes.md (English, internal companion document). - Drop the three original files. https://claude.ai/code/session_012S8FTBQd7v2E5nG868nxLh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
Revives
claude/dev-plan-checklist-RrfmF— seven commits, 2026-05-11/12. The original branch is untouched.Why this exists
mainwas re-rooted atb55bd3e7(2026-07-10) and now holds 173 commits. This branch shares no merge base with it, so a PR from it reads as deleting most of the repo. The seven authored commits are cherry-picked onto currentmaininstead.Two cherry-pick conflicts came up and were resolved toward current
main, not the May version — these are the only edits on top of the originals:useComponentProps.ts—mainhas since movedThemeDefaults/ThemeUIout of this file; keptmain's version.filter?theme-defaults entry moved fromuseComponentProps.tsto its current home,src/runtime/types/theme.ts.Type of change
What it adds
A
Filtercomponent and its parts —FilterBar,FilterField,FilterPanel,FilterPresets,FilterFieldsEditor,FilterSortableList— plus types, op guards, theme, a locale strings bundle, docs, playground pages, a skill entry and planning docs underdocs/plans/. 13 source files, ~2000 lines.The component itself is intact:
test/components/Filter.spec.tspasses (28 tests) andbuildsucceeds. What fails is four families of cross-cutting guards that this fork adopted after May, and which the branch necessarily predates.What blocks it — the 10 red assertions
icon-dictionarydictionary/iconsby roleFilterBar/FilterField/FilterPresetsimportSearch1Icon,CrossLIcon,PlusIcon,DragLIcondirectly, each duplicating a role the dictionary already owns (search,close,plus,drag)localesrc/runtime/locale/is a UI locale exported from the indexlocale/filter.tsis not a language file — it is the component's Russian strings bundle, misfiled there; it needs a different homedocs-component-registriesdocs/nuxt.config.tspagesfilter.mdwas added before that registry guard existed, so it is unregisteredskill-manifestB24Filterrow and itsfilter.mdbadge/link need reconcilingNone of these is a defect in the feature; each is a convention that did not exist when the branch was written. Fixing them is real adaptation — dictionary-icon swaps, relocating the strings bundle out of the locale system, registering the page, and the skill row — and touches the component's design, so it is left for whoever un-freezes this, not smuggled in here.
Verification
Run as recorded,
CI=true:dev:prepare·lint(clean) ·typecheck(clean) ·build(clean) ·test— 10 failed, 7146 passed, 6 skipped across the four guard specs above; the component's own suite is green.Checklist
Generated by Claude Code