Add the provided label/tag icon to the #465 icon mechanism and place it on the Labels tab, the issues-list labels filter, and the labels page #485
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#485
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?
Add the provided label/tag icon to the #465 icon mechanism and place it on the Labels tab, the issues-list labels filter, and the labels page
What's requested
Add the user-provided
label.svg(delivered at/tmp/svg-icons/label.svg: 1em × 1em,stroke="currentColor", viewBox0 0 24 24) to the embeddedICONSmap inweb/src/lib/icons.jsxunder the namelabel, embedded verbatim per the #465 rules (path/viewBox unmodified, currentColor paint preserved, inline JSX, no runtime fetches — same treatment as the existing 11 entries including the #466plus).Then render it on three label surfaces:
web/src/pages/Issues.jsx—LabelsFiltertrigger<button>(~line 79,class="input flex w-full items-center justify-between gap-2 …")▾caretlabelicon at the LEFT of the summary text, inside the existing flex row (shrink-0); keep the caret and aria-label as-isweb/src/pages/Labels.jsx(route/:owner/:name/labels) — the page heading blocklabelicon beside the heading text, composed into the existing heading flow (inline row with gap — do NOT drop it in as its own row; same composition rule as the #481-style additions)web/src/pages/Repo.jsx— theTABSarray (~line 162) + the<For each={TABS}>tab-strip render (~line 688)Labelsentry toTABSwith thelabelicon — but then decide whether icon-bearing tabs generalize (does the icon render for every tab or only ones with an icon defined?) — or (b) leave the tab strip alone and place the icon on the Labels PAGE heading only, treating the "Labels tab" as the labels page's own header. Preference: (a) with theicon?:field optional on theTABSentries so only tabs with icons render one, and the #319tabBadge+ #274 scroll-into-view behavior untouched. If (a) would make Labels the only tab with an icon and look inconsistent, say so and fall back to (b).Architecture notes
web/src/lib/icons.jsx, landed): mixed viewBoxes scale throughwidth="1em" height="1em"; the.iconutility inweb/src/ui.cssgivesinline-block+ no-shrink + baseline alignment; no color literals; size/spacing belongs to the caller's classes. The newlabelentry follows exactly.input-class button: the icon is decorative (aria-hidden="true", which the sharedIconcomponent already sets); the button's existingaria-label/titleremain the accessible signal. Themin-w-0 flex-1 truncatespan stays the truncating element — the icon must not be clipped and must not break the summary truncation.labels:{o}/{r}is already fetched by both pages).Acceptance criteria
ICONSmap gainslabel, embedded verbatim from the provided file (path + viewBox byte-identical in intent,currentColorpreserved)/:owner/:name/labels) heading shows the label icon composed into the heading flowtabBadge(#319) and active-tab scroll (#274) behavior intact if (a)aria-hidden="true"; no accessible name changes textIcon file
label.svg(verbatim from the user;1em,currentColor— missing from the filed body, posted here as the source of truth):Note: the icon source files (label) are posted as comments below in ```svg blocks — copy verbatim into web/src/lib/icons.jsx. The body does not contain the SVG markup.
Fix ready for review: PR #492 (#492) — branch fix/issue-485. Tab-icon decision: option (a) in the #484 sense (conditional label icon inside the existing Issues tab under /labels); the literal new-TABS-entry variant was rejected per the issue's own fallback trigger (sole permanent-icon tab + highlight/navigation split). Headless 1073 total / 1071 pass / 2 fail (pre-existing smoke); vite build green.
Review of PR #492 (fix/issue-485) — verified in scratch worktree /tmp/pr492 (removed afterward); main worktree untouched (still clean). No browser drive per instructions — node tests + compiled-bundle reasoning only, noted explicitly below.
VERBATIM TRANSCRIPTION — PASS (programmatic). /tmp/svg-icons/label.svg vs web/src/lib/icons.jsx label entry: viewBox '0 0 24 24' identical; d string byte-identical (420 chars, m19.293 9.951l-2.333-2.8...); fill=none, stroke=currentColor, stroke-linecap/linejoin=round, stroke-width=2 all preserved; no hex/rgb literal in the entry.
THREE SURFACES — PASS. (a) Issues.jsx:100 left of the summary span inside the existing flex trigger row. (b) Labels.jsx:80 heading 'flex items-center gap-2 ... Labels' — composed into heading flow, not its own row. (c) Repo.jsx:810 conditional inside the existing Issues tab via new isLabelsPath(), only under /labels.
TAB DECISION — option (a) in the #484 sense, JUSTIFIED. A new Labels TABS entry would split highlight from navigation (web/src/lib/tabs.js:21 maps labels→issues, so activeTab never returns a labels id) and would be the sole permanent-icon tab — the issue's own fall-back-to-(b) trigger. Conditional matches the established #484 strip idiom (Issues tab already carries milestone-open under /milestones); the two conditions are mutually exclusive (segs[2] can't be both), TABS stays 7 entries, #319 badge + #274 scroll-into-view byte-identical.
TRIGGER INTEGRITY — PASS. Caret span (aria-hidden shrink-0), button aria-label/title, and the 'min-w-0 flex-1 truncate' summary span all intact; icon is shrink-0 via shared .icon so truncation unchanged. Dropdown rows untouched (menuitemcheckbox roles, color-dot+check idiom, no Icon in menu block).
DECORATIVE — PASS. Shared svg carries aria-hidden=true (icons.jsx:186); no accessible-name changes (tab label text, heading text, button aria-label all unchanged); no per-icon class= on any of the three call sites.
DEPS/DOCS — PASS. No dep-file changes (package.json/pnpm files identical to main; runtime stays solid-js+router+marked+dompurify per law 1). Decision appended to docs/go/12_web_ui.md in the same change (law 12). No core-package or seam changes (law 8); no long-work/task surface (law 7 n/a).
TESTS (scratch, node_modules symlinked from main): full node --test web/test/unit/*.test.js = 1073 total / 1071 pass / 2 fail; the 2 failures are smoke.test.js live-server subtests (needs live Go server + built dist), unrelated to this PR. New label-icon-485.test.js: 9/9 pass. vite build (local pinned binary, from web/): exit 0, label path fragment present in dist/assets/index-BV54Ibmu.js. (Note: repo-rule browser proof stays open — shared-daemon loopback guard; no private daemon used.)
No fixes needed — pushed nothing. MERGE RECOMMENDATION: ready to merge.
Fixed by PR #492 (review clean — byte-identical transcription, all 3 surfaces, tab decision justified), merged. Closing.