Diff gutter: drop the hover-plus, lead with the +/- sign column, make row hover the affordance #598
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#598
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?
Diff gutter: drop the hover-plus, lead with the +/- sign column, make row hover the affordance
What's requested
Rework the diff row anatomy so the interactivity affordance is the row itself, not a floating
+:+comment trigger that sits in the left gutter of diff rows goes away entirely.+/-/context space) becomes the FIRST column of every diff row, ahead of the line numbers.line-hltreatment: amber tint + emerald gutter edge,ui.css.diff-row.line-hlrules ~361-363), telling the user the row is clickable; clicking the row stages a line comment where commenting is gated on.Evidence (current state, both diff renderers)
web/src/pages/Pull.jsxDiffFile (~line 530-570): every row renders[gutter "+" span (w-6, always visible)] [oldNo] [newNo] [sign w-4] [text]. The plus column sits LEFT of the numbers and the sign column is buried 4th, between the numbers and the code — inverted from every mainstream diff UI (GitHub/GitLab put the sign first).web/src/components/DiffTable.jsxlineTap()(~line 216-228): a hover-revealed+(group-hover:inline) is appended to the END of each code cell. It is the only hover-dependent affordance in the app's diff UI and is invisible until hover, easy to miss on both fine and coarse pointers.lineClass(), DiffTable.jsx line 66), which reads poorly for color-blind users and in screenshots.Architecture notes
lineTaptakes away its single-line staging path — DiffTable code cells deliberately carry no handlers (text selection must keep working) and single-line staging currently rides ONLY on the tap-plus (the range path rides on gutter-number drag + the "comment on selection" bar). Either keeplineTap's staging but relocate it into the new leftmost sign column (sign cell as the tap target), or add row-click staging mirroring DiffFile'sonRowClickisolation check (closest("button, a, input, textarea, select, [data-no-row-comment]")). Pick one and note it — do not silently drop single-line commenting on the Files tab/commit diff.anchorContextShainweb/src/lib/diff.js↔DriftHashininternal/review/model.go) and the vectors indiff-review.test.jsare untouched: this is pure presentation/anatomy — no anchor construction, no hash input bytes change.select-noneand carries no drag handlers unless it becomes the tap target per the scope decision above.ml-14composer/thread indentation in Pull.jsx is derived from the current row layout (plus column + two number columns); re-derive the indent so composers still visually align under their row.line-hlrow-highlight tokens rather than new colors.Acceptance criteria
+button renders in the left gutter of any diff row (conversation diff, Files tab, commit page) in any state — hover, focus, or touch.line-hltreatment in both themes; the highlight is the affordance signaling the row is interactive.diff-review.test.js).Fixed by #606 (merged): gutter plus removed everywhere; sign column first on all three surfaces (unified rows show visible signs); line-hl row hover is the affordance; DiffTable single-line staging relocates to the sign cell (row-click rejected to protect #555 text-selection); cards realigned ml-8; hashes byte-identical. Review fixed one defect pre-merge (cursor-pointer now gated on commentable rows). Verified: 1536 unit green (smoke excluded, pre-existing), vite/esbuild green, independent review APPROVE.