Label picker dropdown: rows misalign and wrap badly with multi-word label names and long descriptions #334
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub#334
Loading…
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?
What's wrong
Since the default label packs landed (#324 — multi-word names like "good first issue" / "help wanted", plus long descriptions), the label picker dropdown renders poorly. Screenshot evidence:
Root cause (code evidence)
web/src/components/LabelPicker.jsx:108-127— each row is one flat flex line:Problems: the name span has no
whitespace-nowrap(wraps), the descriptiontruncatelacks a constrained flex context (min-w-0chain) so it truncates arbitrarily, and name + description aren't in separate columns, so wrapped names push the description to a ragged position. The dropdown is fixedw-64(:91) — fine, but the inner layout can't adapt.Fix direction
Restructure the row into a three-column grid:
[check+dot] [name] [description]:whitespace-nowrap— names never wrap; the dropdown width accommodates them (or the name truncates at an agreed limit with atitle— but "good first issue" must fit; widenw-64towardw-80if needed).truncate+min-w-0so it truncates at a consistent width, with the full text in the row'stitle(already present — extend it to include the description if truncated).menuitemcheckbox,aria-checked, outside-click/Esc close, busy-disable, keyboard nav (none currently beyond Tab — unchanged).Acceptance criteria
Fix is up in #342 (#342, branch fix/issue-334): rows are now a three-column grid [check+dot] [name nowrap] [description truncate+min-w-0], panel w-64 → w-80. MilestonePicker checked — single-span rows, no sibling column to shift, left untouched. Full web suite 658 green, vite build green. Browser visual check (both themes, 390px) left for review — shared daemon blocks loopback. Not merging per workflow.
Review of PR #342 (
535e09c, branch fix/issue-334) — verified in scratch worktree /tmp/pr342, main worktree untouched.Grid anatomy — correct (LabelPicker.jsx:109-127). Col 1 groups check (w-4) + dot in one
flex shrink-0 items-center gap-2span with a single aria-hidden — constant-width column, a11y equivalent to before. Col 2 name ismin-w-0 overflow-hidden text-ellipsis whitespace-nowrap font-medium— never wraps, ellipsizes past its half. Col 3 description ismuted min-w-0 truncate text-xs— truncates at a consistent width.grid-cols-[auto_minmax(0,1fr)_minmax(0,1fr)]gives both text columns equal flexible halves, so every row's name starts at the same x. Rows without a description leave col 3 empty — grid position unchanged, no ragged shift.w-80 fits at 390px — verified. 320px <= 390-16=374px (#278
max-width: calc(100vw - 1rem)cap in ui.css:181-183), so the right-anchored panel renders full-width with no shrink and no page-level horizontal scroll. Back-of-envelope on the name half: ~280px content minus ~44px col 1 leaves ~118px for the name; 'good first issue' at text-sm/medium is ~112px — fits, and any overlong name degrades to ellipsis + tooltip per the issue's agreed direction.Title carries name + description (L109). Extends the pre-existing apply/remove + name title with
— descriptiononly when present; rows without descriptions keep the old title byte-for-byte.Semantics/keyboard unchanged. menuitemcheckbox, aria-checked, disabled=isBusy, onToggle, Esc + outside-click close, native buttons — all present, asserted in-test.
No #278 regression.
label-drop scroll-slim card absolute right-0 z-30hook intact; ui.css untouched — opaque rule (L170) and viewport bound (L181-183) still cover .label-drop; no new CSS (the grid-cols arbitrary value is a Tailwind-generated utility, confirmed present in shipped CSS:.grid-cols-[auto_minmax(0,1fr)_minmax(0,1fr)]{grid-template-columns:auto minmax(0,1fr) minmax(0,1fr)}), no new deps (diff touches 3 files only). Law 1 holds.MilestonePicker out of scope — claim verified. MilestonePicker.jsx:93-111 rows are flex with check + a single title span (+ optional state chip), no description column; wrapped titles wrap inside one column and cannot ragged-shift a sibling. Left as-is is correct. Also checked LabelColorPicker.jsx:126 — a color-swatch listbox grid, not label rows; correctly untouched.
Dark + light. No color-class changes in the diff (shared card/hover/border treatment retained); layout-only change is theme-independent.
Doc decision accurate (02_issues.md). Grid shape, w-80 math, #278 hook, semantics, MilestonePicker note all match the code; it honestly flags browser proof as open rather than claiming it — correct, since I could not drive a browser either (no browser use per review instructions; node tests + reasoning only).
Tests (scratch worktree, node_modules symlinked from main, symlink died with the worktree): new label-picker-rows.test.js 7/7 pass; full suite
node --test web/test/unit/*.test.js658 pass / 0 fail (matches PR claim; suite takes ~119s — an earlier 180s-timeout run was just my limit, not a hang);vite buildgreen with the arbitrary grid-cols rule confirmed generated into dist CSS.No fixes needed — nothing pushed.
MERGE RECOMMENDATION: ready to merge (only remaining item is the live-browser visual check in both themes at 390px, which the doc already marks open for whoever has a browser handy).
Fixed by PR #342 (review clean; grid anatomy + 390px fit + #278 no-regression + shipped-CSS verified; 658/658), merged. Closing.