feat(reports/category): searchable combobox for category zoom (#103) #108
No reviewers
Labels
No labels
source:analyste
source:defenseur
source:human
source:medic
status:approved
status:blocked
status:in-progress
status:needs-fix
status:ready
status:review
status:triage
type:bug
type:feature
type:infra
type:refactor
type:schema
type:security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: maximus/Simpl-Resultat#108
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-103-category-combobox"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
<select>inCategoryZoomHeaderwith the reusableCategoryCombobox(typeable input, accent-insensitive filtering, ↑/↓/Enter/Esc navigation, close on outside click).CategoryComboboxwith full ARIA compliance (role="combobox"/listbox/option,aria-expanded,aria-controls,aria-activedescendant,aria-selected) and hierarchical indentation based onparent_iddepth.reports.category.searchPlaceholderin FR/EN.Notes
src/components/shared/CategoryCombobox.tsx(used by transaction filters, transaction rows, split modal, page help). Reused and extended it rather than building a new one.parent_idchain, then applied aspaddingLeftplus a preservedtext prefix inside a<span class='whitespace-pre'>for good screen-reader output.aria-labelis passed from the Zoom header (localizedselectCategorytext) since the native<label>wraps a custom<input>.Test plan
npm run build(tsc + vite) — greennpm test -- --run— 100/100 passcargo check— green/reports/category, type a partial accented name (e.g.epicematchesÉpicerie), verify arrow keys + Enter + Esc + click-outside + hierarchy indent.Closes #103
Revue — APPROVE ✅
Verdict
Bonne découverte :
CategoryComboboxexistait déjà danssrc/components/shared/et était utilisé par 4 composants. L'Agent l'a étendu plutôt que dupliquer, ce qui est la bonne décision.Points validés
role="combobox",aria-expanded,aria-controls,aria-autocomplete="list",aria-activedescendant,role="listbox",role="option",aria-selected.useId()pour générer des IDs uniques et éviter les collisions entre instances.computeDepths()avec garde-fou de cycle (Set<seen>). UtilisepaddingLeft: calc(...)+ préfixe texte pour les lecteurs d'écran.normalize()(NFD + strip diacritics) est hissée en top-level (plus re-créée à chaque render).CategoryZoomHeader.tsxmappe proprementCategoryRow→Category(aveccreated_at: ""placeholder, acceptable car le combobox ne l'utilise pas).reports.category.searchPlaceholder) ajoutés.Changed/Modifié.Impact non-intentionnel mais bénéfique
L'indentation est désormais appliquée partout où
CategoryComboboxest utilisé (TransactionFilterBar, TransactionTable, SplitAdjustmentModal, PageHelp). C'est un gain UX gratuit — les autres consommateurs n'affichaient pas la hiérarchie auparavant.Vérifications locales
npm test -- --run: 100/100 vertsnpm run build: ✅Suggestions non-bloquantes
CategoryRow → Categoryaveccreated_at: ""est un signe que le typeCategoryest trop large pour ce use case — unCategoryLitedédié simplifierait. Follow-up optionnel.Rien ne bloque le merge.