Add milestone-open/milestone-done icons to the #465 icons mechanism; apply state-mapped on milestones page, issues list, and the repo tab strip #484
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#484
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 milestone-open/milestone-done icons to the #465 icon mechanism and apply them state-mapped on milestones surfaces
Sequencing
Builds directly on the landed #465 shared icon mechanism (
web/src/lib/icons.jsx, in tree as of2b42843). #481 already extends the same mechanism with the provided comment-bubble icon on the issues list — this ticket adds the two milestone icons and their three call sites; coordinate so the icons.jsx edits do not collide (sequential is fine, the map is append-only).What's requested
Add the two user-provided milestone SVGs —
milestone-open.svgandmilestone-done.svg(delivered at/tmp/svg-icons/, 1em × 1em,fill="currentColor", viewBox0 0 24 24and0 0 16 16respectively) — to the embeddedICONSmap inweb/src/lib/icons.jsxas"milestone-open"and"milestone-done", embedded verbatim (paths/viewBoxes unmodified, currentColor paint preserved, no runtime fetches — same rules as the existing 11 entries).Then apply them state-mapped in three places:
web/src/pages/Milestones.jsx(~line 129,<span class="chip">{m.state}</span>next to the<h3>title)openmilestone-openicon inside the chip, left of the state textweb/src/pages/Milestones.jsx(the "Closed" section, collapsed single-line cards ~line 180)milestone-doneicon left of the title in each closed rowweb/src/pages/Issues.jsx(~line 369,<A class="chip max-w-40 truncate …">{d().text}</A>)milestone-openicon left of the milestone title inside the chip (the chip links to the milestone filter; state here is the milestone's own open state, not the issue's — see below)web/src/pages/Repo.jsxTABSarray (~line 162) + the<For each={TABS}>render (~line 688)milestonesmaps to theissuestab id inlib/tabs.js(the /milestones route highlights "Issues")milestone-openicon. Do not break the #319 open-count badge (tabBadge) or the #274 scroll-into-view behavior in either case.State mapping question the implementer must settle and note: the issues-list chip and the tab strip icon can be either static (
milestone-openalways) or state-aware when the milestone'sstateis available in the payload (themilestones:{o}/{r}cached set the chip title already resolves against carries per-milestone state). Preference: state-aware where the payload already has it, static where it doesn't — but do not add new requests to get state.Architecture notes
width="1em" height="1em";.iconutility fromweb/src/ui.css; no color literals; size/spacing belongs to the caller's classes. The two new entries follow it exactly — the 16-unit vs 24-unit viewBox difference is expected and already handled.max-w-40 truncate): the icon must not be clipped —flex-shrink: 0is already on.icon; keep the title text as the truncating element.{m.state}reads the raw state string; if the icon makes the redundant word noisy, keeping the word is still the default (accessibility signal beyond the icon) — the icon is decorative witharia-hidden="true".milestones:{o}/{r}is already fetched by both pages).Acceptance criteria
ICONSmap gainsmilestone-openandmilestone-done, embedded verbatim from the provided files (paths + viewBoxes byte-identical in intent,currentColorpreserved)max-w-40still truncates the title, icon never clipped)tabBadge(#319) and active-tab scroll (#274) behavior intactaria-hidden="true"; no accessible name changes textIcon file
milestone-open.svg(verbatim from the user;1em,currentColor— missing from the filed body, posted here as the source of truth):Icon file
milestone-done.svg(verbatim from the user;1em,currentColor— missing from the filed body, posted here as the source of truth):Note: the icon source files (milestone-open / milestone-done) 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 PR: #490 (branch fix/issue-484). Notes: icons embedded AS LABELED (open=16, done=24) — the issue body prose has them swapped; repo strip takes option (a) per the rationale in Repo.jsx + docs/go/12_web_ui.md.
REVIEW PR #490 (fix/issue-484) — verified in scratch worktree, all checks pass with one small fix pushed (
789e331).TESTS (head-to-head, full node --test): PR branch 1064 total / 1062 pass / 2 fail vs pristine main 1055 / 1053 / 2 — delta is exactly the 9 new tests, failures are the same 2 pre-existing live-server smoke subtests. PR description's '944/929/15 (+13 data/markdown failures)' is STALE — those 13 failures do not exist on current main. FIXED in-docs by
789e331(12_web_ui.md now reads 1064/1062/2 vs 1055/1053/2); PR description body still shows the stale numbers — cosmetic, consider editing. vite build green, both path fragments confirmed in dist bundle (index-*.js).RECOMMENDATION: ready to merge (after optional PR-body number touch-up). No browser proof — same standing caveat as prior web PRs.
Fixed by PR #490 (review clean + stale test-count fix by reviewer; byte-identical transcription, as-labeled viewBoxes, all 4 surfaces verified), merged. Closing.