mirror of
https://github.com/PerpetualSoftware/pad.git
synced 2026-09-11 21:39:01 +00:00
a829d3a06d
* fix(web): ItemCard polish — nudge PR badge down, wrap long titles (BUG-1233)
Two small fixes on the item card:
1. PR badge vertical position: top: -6px → 8px. The previous offset
pushed the badge above the card edge; 8px sits the pill comfortably
inside the top of the card while keeping the right: -6px overhang
(sticker-on-edge feel). Cosmetic polish on TASK-1230.
2. Long-title overflow (BUG-1233). Item cards with unbreakable titles
(URLs, long identifiers, code-snippet titles) used to push the card
past its container — most visible on board view's narrow columns.
- `.item-card` → `min-width: 0` so it can shrink below its intrinsic
content width when it's a flex/grid child
- `.card-title` → `overflow-wrap: anywhere; min-width: 0` so any
character can be a break point when whitespace is absent
Deliberately NOT setting `overflow: hidden` on `.item-card` — the
PR badge protrudes at `right: -6px` and would be clipped.
Verification:
- golangci-lint -> 0 issues
- go test ./... -> all pass
- cd web && npm run build -> clean
- Manual: long-title item now wraps inside the card on board + list views;
PR badge still renders correctly at the new position.
* fix(web): reserve top-row right padding for PR badge per Codex review (round 1)
Codex flagged that moving the PR badge from top: -6px to top: 8px
brought it inside the card and on top of the .card-top-row content
(star button, optional collection badge, item ref). On dashboard
active-items panel and role board (both pass showCollection=true) or
items with long refs, the badge could cover that text and intercept
clicks.
Fix: add `class:has-pr={!!pullRequest}` to the card and reserve
padding-right: 52px on .card-top-row whenever a PR badge is present.
Width budget covers a 5-digit PR number worst case plus the badge's
right: -6px protrusion (~50px pill - 6px overhang = 44px inner gap;
rounded up to 52px for breathing room). Non-PR cards keep their full
top-row width.