#260: static button width during copy feedback (fix attempt 2) #272

Closed
fen wants to merge 1 commits from fix-260 into dev
Collaborator

Fix attempt 2 for #260. Owner: button must be fully static on click; attempt 1's min-width pin enlarged buttons by up to 0.64px (Math.ceil of a fractional width) and leaked the pin after restore.

Approach: .swapbtn pattern as QA guidance specified. The label and the checkmark stack in one grid cell (inline-grid, both children grid-area 1/1, checkmark visibility:hidden until .ok), so feedback is a pure classList toggle and no width pinning exists at all. Applied to paste-view Copy/Link (paste.html + paste.js copyFeedback) and the /new result-box copy button (new.js).

Verified locally with CDP bounding-box probes on a test build:

  • Paste view #copy-btn: width/x identical before/during/after at 1400x900 (76.421875px) and 375x812 (52.359375px, the exact case attempt 1 failed); Link and Wrap neighbors static; checkmark visibility=visible during feedback.
  • /new result copy button: width 44.953125px static across click at both widths, checkmark visible, btn.style.minWidth empty.
  • go build + go test ./... pass.

Ref #260

Fix attempt 2 for #260. Owner: button must be fully static on click; attempt 1's min-width pin enlarged buttons by up to 0.64px (Math.ceil of a fractional width) and leaked the pin after restore. Approach: .swapbtn pattern as QA guidance specified. The label and the checkmark stack in one grid cell (inline-grid, both children grid-area 1/1, checkmark visibility:hidden until .ok), so feedback is a pure classList toggle and no width pinning exists at all. Applied to paste-view Copy/Link (paste.html + paste.js copyFeedback) and the /new result-box copy button (new.js). Verified locally with CDP bounding-box probes on a test build: - Paste view #copy-btn: width/x identical before/during/after at 1400x900 (76.421875px) and 375x812 (52.359375px, the exact case attempt 1 failed); Link and Wrap neighbors static; checkmark visibility=visible during feedback. - /new result copy button: width 44.953125px static across click at both widths, checkmark visible, btn.style.minWidth empty. - go build + go test ./... pass. Ref #260
fen added 1 commit 2026-09-17 22:18:36 +00:00
#260: .swapbtn grid for copy feedback (fix attempt 2)
CI / docker (pull_request) Skipped
CI / test (pull_request) Successful in 23s
c32566979f
Label and checkmark stack in one grid cell (inline-grid, grid-area 1/1,
checkmark visibility-hidden until .ok), so the button width is static by
construction across the click. Replaces the min-width pin from fix attempt
1, which enlarged buttons by up to 0.64px (ceil of fractional width) and
leaked the pin after restore.

Applies to paste-view Copy/Link (paste.html + paste.js copyFeedback) and
the /new result-box copy button (new.js). Verified with CDP bounding-box
probes: Copy width/x identical before/during/after at 1400x900 and
375x812 (including the previously failing 52.36px mobile case), Link
button static, checkmark visible during feedback, no minWidth pin set.
fen closed this pull request 2026-09-17 22:19:49 +00:00

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.