Success! on button clicks #260

Closed
opened 2026-09-17 19:27:00 +00:00 by poslop · 6 comments
Owner

when clicked the buttons turn green and show success as they should. the problem is the message success is wider than the normal text which causes elements and buttons to jump around.

to avoid this instead of saying success replace it with a short and small checkmark

when clicked the buttons turn green and show success as they should. the problem is the message success is wider than the normal text which causes elements and buttons to jump around. to avoid this instead of saying success replace it with a short and small checkmark
poslop added the Assigned label 2026-09-17 19:27:00 +00:00
fen added In Progress and removed Assigned labels 2026-09-17 19:27:22 +00:00
fen added spent time 5 minutes 2026-09-17 19:27:27 +00:00
fen added spent time 1 minute 2026-09-17 19:27:40 +00:00
fen added QA and removed In Progress labels 2026-09-17 19:29:13 +00:00
fen added spent time 10 minutes 2026-09-17 19:29:13 +00:00
Collaborator

QA PASS. Verified live on palette-dev after merging #262 and deploying the CI dev image.
Fix: Success! text replaced with a compact checkmark in new.js (result box copy button) and paste.js (copyFeedback, restores the saved dataset.label).
Evidence: rendered CDP probe at 1400x900 and 375x812. Copy button 76px -> 44px (desktop) / 52px -> 33px (mobile) while showing the checkmark; Link button and row bounds unchanged (0px shift), label restores correctly. Served paste.js/new.js sha256 match origin/dev tip. go build + go test pass.

QA PASS. Verified live on palette-dev after merging #262 and deploying the CI dev image. Fix: Success! text replaced with a compact checkmark in new.js (result box copy button) and paste.js (copyFeedback, restores the saved dataset.label). Evidence: rendered CDP probe at 1400x900 and 375x812. Copy button 76px -> 44px (desktop) / 52px -> 33px (mobile) while showing the checkmark; Link button and row bounds unchanged (0px shift), label restores correctly. Served paste.js/new.js sha256 match origin/dev tip. go build + go test pass.
fen closed this issue 2026-09-17 19:37:47 +00:00
fen removed the QA label 2026-09-17 19:37:47 +00:00
fen added spent time 15 minutes 2026-09-17 19:37:47 +00:00
Author
Owner

The button size should be static and shouldnt change on click. the check mark looks good but its still jerky.

The button size should be static and shouldnt change on click. the check mark looks good but its still jerky.
poslop reopened this issue 2026-09-17 19:42:27 +00:00
poslop added the Assigned label 2026-09-17 19:42:32 +00:00
fen added In Progress and removed Assigned labels 2026-09-17 19:43:08 +00:00
fen added spent time 5 minutes 2026-09-17 19:43:08 +00:00
fen added spent time 1 minute 2026-09-17 19:43:18 +00:00
fen added spent time 2 minutes 2026-09-17 19:43:23 +00:00
fen added Assigned and removed In Progress labels 2026-09-17 19:45:21 +00:00
fen added spent time 40 minutes 2026-09-17 19:45:56 +00:00
fen added QA and removed Assigned labels 2026-09-17 19:47:54 +00:00
fen added spent time 15 minutes 2026-09-17 19:47:54 +00:00
fen added spent time 15 minutes 2026-09-17 22:10:45 +00:00
Collaborator

QA FAIL (PR #268, fix attempt 1 — merged as 2a55f50d and deployed to palette-dev, served paste.js/new.js sha256 match origin/dev; the deploy itself is fine, the acceptance is not met).

Measured rendered bounding boxes of the Copy button (#copy-btn) on https://palette-dev.archfox.org/4uarj5, real .click(), checkmark visible during, clipboard verified written:

  • BEFORE click: width 52.36px (minWidth empty, text "Copy")
  • DURING (✓): width 53.00px (minWidth "53px") ← +0.64px jump
  • AFTER restore: width 53.00px (pin never released) ← still 0.64px wider than before

Identical result at 375x812 (52.36 → 53.00 → 53.00). Neighbor Link button did not move, but the button itself is NOT pixel-identical across the click, which the acceptance rejects.

Root cause: the fix pins Math.ceil(width) = 53 while the natural rendered width is 52.36px (fractional px), so the min-width pin itself enlarges the button. It is also not the .swapbtn pattern you asked for: textContent is still swapped rather than stacking label + checkmark in one grid cell, so the pin bookkeeping is load-bearing and leaks (minWidth persists after restore).

Fix guidance for attempt 2: implement .swapbtn in new.js + paste.js (inline-grid, label and ✓ in grid-area 1/1, ✓ visibility:hidden until .ok) so no width pinning is needed at all, and verify Copy rect is identical before/during/after at 1400x900 and 375x812.

QA FAIL (PR #268, fix attempt 1 — merged as 2a55f50d and deployed to palette-dev, served paste.js/new.js sha256 match origin/dev; the deploy itself is fine, the acceptance is not met). Measured rendered bounding boxes of the Copy button (#copy-btn) on https://palette-dev.archfox.org/4uarj5, real .click(), checkmark visible during, clipboard verified written: - BEFORE click: width 52.36px (minWidth empty, text "Copy") - DURING (✓): width 53.00px (minWidth "53px") ← +0.64px jump - AFTER restore: width 53.00px (pin never released) ← still 0.64px wider than before Identical result at 375x812 (52.36 → 53.00 → 53.00). Neighbor Link button did not move, but the button itself is NOT pixel-identical across the click, which the acceptance rejects. Root cause: the fix pins `Math.ceil(width)` = 53 while the natural rendered width is 52.36px (fractional px), so the min-width pin itself enlarges the button. It is also not the .swapbtn pattern you asked for: textContent is still swapped rather than stacking label + checkmark in one grid cell, so the pin bookkeeping is load-bearing and leaks (minWidth persists after restore). Fix guidance for attempt 2: implement .swapbtn in new.js + paste.js (inline-grid, label and ✓ in grid-area 1/1, ✓ visibility:hidden until .ok) so no width pinning is needed at all, and verify Copy rect is identical before/during/after at 1400x900 and 375x812.
fen added In Progress and removed QA labels 2026-09-17 22:11:32 +00:00
fen added spent time 5 minutes 2026-09-17 22:11:33 +00:00
fen added spent time 2 minutes 2026-09-17 22:12:09 +00:00
fen added spent time 8 minutes 2026-09-17 22:13:42 +00:00
fen added QA and removed In Progress labels 2026-09-17 22:13:42 +00:00
fen added spent time 18 minutes 2026-09-17 22:18:36 +00:00
Collaborator

Superseding PR #272 (fix-260) closed without merging: a competing fix-attempt-2 implementation (#271, fix-260-r2) was already merged to dev. Same .swapbtn one-grid-cell approach; QA continues against dev tip.

Superseding PR #272 (fix-260) closed without merging: a competing fix-attempt-2 implementation (#271, fix-260-r2) was already merged to dev. Same .swapbtn one-grid-cell approach; QA continues against dev tip.
Collaborator

QA PASS. Verified live on palette-dev after merging #271 and deploying the CI dev image (ca0e511).

Fix: .swapbtn pattern — label and checkmark stack in one inline-grid cell (grid-area 1/1), button width is always the wider of the two, feedback is a pure .ok class toggle. Replaces attempt 1 min-width pinning and all textContent swaps in new.js and paste.js; markup updated in paste.html.

Evidence: served app.css/new.js/paste.js sha256 match origin/dev tip. CDP probe on /4uarj5, real control path (copyFeedback) at 1400x900 and 375x812: Copy 76.42px before / during / after (desktop), 52.36px all states (mobile); Link 65.63px / 45.86px static likewise; checkmark visibility hidden→visible→hidden; button-row top shift 0.00px. Wrap toggle off (control case). No width change in any state, no element movement.

QA PASS. Verified live on palette-dev after merging #271 and deploying the CI dev image (ca0e511). Fix: .swapbtn pattern — label and checkmark stack in one inline-grid cell (grid-area 1/1), button width is always the wider of the two, feedback is a pure .ok class toggle. Replaces attempt 1 min-width pinning and all textContent swaps in new.js and paste.js; markup updated in paste.html. Evidence: served app.css/new.js/paste.js sha256 match origin/dev tip. CDP probe on /4uarj5, real control path (copyFeedback) at 1400x900 and 375x812: Copy 76.42px before / during / after (desktop), 52.36px all states (mobile); Link 65.63px / 45.86px static likewise; checkmark visibility hidden→visible→hidden; button-row top shift 0.00px. Wrap toggle off (control case). No width change in any state, no element movement.
fen added spent time 15 minutes 2026-09-17 22:23:20 +00:00
fen closed this issue 2026-09-17 22:23:20 +00:00
fen removed the QA label 2026-09-17 22:23:20 +00:00
fen added spent time 30 minutes 2026-09-17 22:35:55 +00:00
Collaborator

QA PASS — #260 fix attempt 2 (PR #271)

Verified live on https://palette-dev.archfox.org (deployed image confirmed: served app.css/new.js/paste.js sha256 identical to git show origin/dev).

All three measured rects identical to 0.01px before / during (.ok) / after click; checkmark visible during .ok, label restored after; no neighbor movement; zero CSP violations (only pre-existing password-field DOM recommendations). Real Input.dispatchMouseEvent clicks; clipboard content confirmed via readText.

Paste view — Copy (1400x900): w 76.421875, h 43.296875, x 592.4375, y 109 — constant across all three states
Paste view — Link (1400x900): w 65.625, h 43.296875, x 514.8125, y 109 — constant
New page — result Copy (1400x900): w 78.46875, h 36, x 1094, y 824.765625 — constant

Paste view — Copy (375x812): w 52.359375, h 32.84375, x 25, y 119.84375 — constant (attempt-1's 52.36→53.00 growth is gone)
Paste view — Link (375x812): w 45.859375, h 32.84375, x 274.34375, y 79 — constant
New page — result Copy (375x812): w 78.46875, h 36, x 243.296875, y 744.890625 — constant

Pin code (minWidth/Math.ceil/textContent swap) confirmed absent from fix-260-r2. Issue closed, labels cleared.

**QA PASS — #260 fix attempt 2 (PR #271)** Verified live on https://palette-dev.archfox.org (deployed image confirmed: served app.css/new.js/paste.js sha256 identical to `git show origin/dev`). All three measured rects identical to 0.01px before / during (.ok) / after click; checkmark visible during .ok, label restored after; no neighbor movement; zero CSP violations (only pre-existing password-field DOM recommendations). Real Input.dispatchMouseEvent clicks; clipboard content confirmed via readText. **Paste view — Copy** (1400x900): w 76.421875, h 43.296875, x 592.4375, y 109 — constant across all three states **Paste view — Link** (1400x900): w 65.625, h 43.296875, x 514.8125, y 109 — constant **New page — result Copy** (1400x900): w 78.46875, h 36, x 1094, y 824.765625 — constant **Paste view — Copy** (375x812): w 52.359375, h 32.84375, x 25, y 119.84375 — constant (attempt-1's 52.36→53.00 growth is gone) **Paste view — Link** (375x812): w 45.859375, h 32.84375, x 274.34375, y 79 — constant **New page — result Copy** (375x812): w 78.46875, h 36, x 243.296875, y 744.890625 — constant Pin code (minWidth/Math.ceil/textContent swap) confirmed absent from fix-260-r2. Issue closed, labels cleared.
Sign in to join this conversation.
2 Participants
Notifications
Total Time Spent: 3 hours 7 minutes
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: poslop/palette#260