Composer "Aan": replace the hand-rolled combobox with nldd-combo-box #209
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
frontend/src/components/composer/TargetPicker.vueis a ~480-line hand-rolled combobox for the new-message "Aan" field: a native<input role="combobox">witharia-activedescendant, arole="listbox"popup, a polite live region, full ArrowUp/Down/Home/End/Enter/Escape keyboard handling and ~150 lines of NLDD-token CSS. Its header comment even states "There is no NLDD combobox" - that is no longer true.NLDD 0.8.69 ships
nldd-combo-box(dist/components/inputs/combo-box/) plus the list / list-item cell components. Adopting it removes the bespoke ARIA, keyboard wiring and CSS, and gives us the design system's built-in accessibility and focus behaviour for free ("componeer, herstijl niet").Scope
nldd-combo-box(withnldd-list/ cells as the option template).aria-activedescendantbookkeeping, live region and the.listbox/.option/.inputCSS.useTargets); collapse to a removable chip on select;matchesTokens, so "off topic groep x" narrows on both);focus()method the overlay calls on open;iconFor/subtitleFor).Verify
Relates to #195 (composer refinement + NLDD alignment) and #182 (align custom popovers to NLDD).
Investigated adopting nldd-combo-box (NLDD 0.8.69). Two capability gaps make it a poor fit here:
nldd-menu-itemis text + icon only (no subtitle / supporting-text), so the per-option second line - team name for channels,@username/ "Nieuw direct bericht" for people - cannot render. That line disambiguates same-named channels across teams and is what makes the picker usable.Decision: keep TargetPicker (the two-line + chip UX is better) and rescope this ticket to aligning its internals to NLDD tokens/components without changing the UX. First pass in this PR: remove button ->
nldd-icon-button; focus ring -> the shared NLDD focus-ring tokens (via the global:focus-visible); dropdown shadow ->--semantics-overlays-box-shadow(it was falling back to a hardcoded value since--shadow-mdwas retired).For the record:
nldd-menudoes expose a customfilterFnandnldd-menu-itemhas analiasessearch field, so the token x (channel|team) matching would have been preservable; the blocker is purely the missing subtitle + the chip.