Restyle the PR review UI (Reviews section + Finish review form) to match system styling #545
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#545
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?
Restyle the PR review UI (Reviews section + Finish review form) to match system styling
What's requested
Bring the two remaining hand-rolled blocks of the PR page — the Reviews section and the Finish review form — onto the app's established styling idioms: the canonical form structure from #479, the primary-button idiom, chip verdicts, and the sectioned-card pattern the rest of the PR page already uses. Styling/markup only; no behavior change.
Canonical references in the current tree
labelwithgrid gap-1, atext-sm font-mediumspan label, the.inputclass on every control, help text scoped to its field viaid+aria-describedby.web/src/ui.cssline 73 —.btn.primary(emerald), i.e.class="btn primary"..chipfamily inweb/src/ui.csslines 108–119 (.chip,.chip-open,.chip-closed,.chip-merged,.chip-draft) — the status-chip language used by issue/pull rows and testpr-structure-531.test.js..cardpanels each with a single.card-header(Forgejo #521 idiom).Divergences found (evidence, all in
web/src/pages/Pull.jsx)card-listclass — ReviewsList wraps its review cards in<ul class="card-list">(Pull.jsx:131; also Checks.jsx:224).card-listhas zero CSS rules inweb/src/ui.css(the shipped stylesheet), so it renders as a bare ul. The #531 test already banscard-listfrom the pulls list (pr-structure-531.test.jsline 102) — extend that standard here..cardwith acard-header(Pull.jsx:129–130) whose items are<li class="card">(Pull.jsx:134): a bordered card inside a bordered card, diverging from the sibling sectioned-card panels on the same page. Restructure so reviews render as cards at the section level (or as an unstyled list inside one panel — implementer's call, but the double chrome must go).btn btn-primaryis not the primary-button idiom — the Finish review submit button usesclass="btn btn-primary"(Pull.jsx:552). Only.btn.primaryis defined in ui.css;btn-primarymatches no rule, so the "primary" action currently renders as a default secondary button. Useclass="btn primary"(the #479 canonical: one primarybtn primary px-3 py-1with busy label swap — the busy swap is already present at Pull.jsx:553).label.fieldis an undefined class — FinishReview's two fields use<label class="field">(Pull.jsx:538, 542; same pattern in PullNew.jsx and MergeBox.jsx)..fieldhas no CSS rule in ui.css, so the label composition drifts from the #479 canonicallabel.grid.gap-1+span.text-sm.font-medium+ control..input— the Body textarea and Verdict select (Pull.jsx:540, 544) carry no.inputclass and render as browser-default controls, unlike every restyled form surface. Notew-fullon textarea is also missing, so the two controls don't even fill the card consistently.decisionBadge(Pull.jsx:68) returns.pillclasses with hardcodedbg-emerald-100/bg-red-100overrides, used for the summary-bar decision (Pull.jsx:90) and each review's state (Pull.jsx:138). Restyle verdicts onto the.chipfamily (rounded 4px uppercase 10px), with the state mapping spelled out: APPROVED → emerald chip, CHANGES_REQUESTED → red chip, COMMENTED → neutral.chip, dismissed → neutral/muted chip (implementer may add chip variants composing with.chipin ui.css rather than inline bg overrides — that keeps future verdicts from re-forking the palette).id+aria-describedbyper the #479 pattern or drop it.Acceptance criteria
card-list(or any other undefined component class) remains in Pull.jsx's review surface; the card-in-card nesting in ReviewsList is resolved to flat sectioned cards matching the Mergeability/Reviewers/Checks panels..card-metalanguage; stale marker and dismiss affordance unchanged in behavior.label+text-sm font-mediumspan +.inputcontrol for Body and Verdict; the reviewing-sha line is field-scoped viaaria-describedbyor removed.btn primary); cancel stays a plainbtn. Verified in rendered output, not just source (see below).pr-structure-531.test.js.card-list/field/btn-primaryclasses are invisible in source reading).Architecture notes
web/src/ui.css(Tailwind v4, CSS-first);web/css/*.cssis dead/unbundled — any new shared classes (chip verdict variants) belong in ui.css@layer components.card-listalso appears in Checks.jsx:224; fix it here only if trivial, otherwise note it for a follow-up so the class doesn't get re-legitimized.Fix ready for review: #549 (branch fix/issue-545). Styling/markup only — flat unstyled reviews list in the one Reviews panel, one reviewVerdictChip mapping (+ new zinc chip-neutral), #479 Finish-review form, btn primary; Checks.jsx wrapper class rides along. Tests 1260/1259 (1 pre-existing live-server smoke fail), vite+esbuild green. Browser proof open per workspace rules.
Review of PR #549 (fix/issue-545) — verified in scratch worktree /tmp/pr549 (removed afterward).
All 10 checks pass; no fixes needed:
Tests (scratch worktree, node_modules symlinked from main): node --test web/test/unit/*.test.js → 1259 pass / 1 fail; the 1 failure is the pre-existing live-server smoke subtest (/setup 403) — reproduced on pristine main too, zero PR-caused. vite build exit 0. No browser drive (per task rules; reasoned at desktop + 390px from the shared row/panel/chip classes — noted explicitly).
MERGE RECOMMENDATION: ready to merge.
Fixed by PR #549 (review clean — all 10 checks pass, guideline extended, behavior identical), merged. Closing.