Skip to content

Swipe the card, not the words on it - #1

Merged
carlitoswillis merged 2 commits into
mainfrom
claude/archive-swipe-text-kp1zys
Aug 2, 2026
Merged

Swipe the card, not the words on it#1
carlitoswillis merged 2 commits into
mainfrom
claude/archive-swipe-text-kp1zys

Conversation

@carlitoswillis

Copy link
Copy Markdown
Owner

Owner on the new swipe-to-archive: "i don't like that the text gets dragged
left too — the card should appear to swipe but the text should stay still."
So the frame slides and the content doesn't. reads the live
offset off a context on SwipeToArchive and applies the exact opposite
translation with the same easing, so the checkbox, title and badges hold
their place on screen while the card travels out from under them.

The card clips its own overflow under sm, which is what keeps this honest:
the still content is revealed away by the card's passing right edge rather
than spilling onto the Archive button underneath. Trailing badges slip
behind it and come back on close. Clipping is phone-scoped — at ≥sm, where
there's no swipe, the card keeps its overflow and its focus rings.

Verified on an emulated phone (390px, real touch events): through drag, deep
pull and the open rest the card travelled 37 → -161 → -71 while the title
stayed pinned at x=70; Archive still reveals and arms. Desktop (1440px)
unchanged — overflow visible, no transform, card still opens the panel. tsc,
11 suites, prod build (128kB held).

Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_017bGaSfKWDhbBcUXH8nLP6g

claude added 2 commits August 2, 2026 17:56
Owner on the new swipe-to-archive: "i don't like that the text gets dragged
left too — the card should appear to swipe but the text should stay still."
So the frame slides and the content doesn't. <SwipeStill> reads the live
offset off a context on SwipeToArchive and applies the exact opposite
translation with the same easing, so the checkbox, title and badges hold
their place on screen while the card travels out from under them.

The card clips its own overflow under sm, which is what keeps this honest:
the still content is revealed away by the card's passing right edge rather
than spilling onto the Archive button underneath. Trailing badges slip
behind it and come back on close. Clipping is phone-scoped — at ≥sm, where
there's no swipe, the card keeps its overflow and its focus rings.

Verified on an emulated phone (390px, real touch events): through drag, deep
pull and the open rest the card travelled 37 → -161 → -71 while the title
stayed pinned at x=70; Archive still reveals and arms. Desktop (1440px)
unchanged — overflow visible, no transform, card still opens the panel. tsc,
11 suites, prod build (128kB held).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017bGaSfKWDhbBcUXH8nLP6g
main landed board archiving (hover button, selection, "a", undo) on the same
card row this branch was holding still, so the two met inside ItemCard.

Taken from main: SwipeToArchive routes through the new `archive()` (Board's
optimistic, undoable path — so the swipe got undo too), and the hover Archive
button. Kept from here: the content row is <SwipeStill> and the card clips
under sm. The hover button sits inside the still row, which is right — it's
hidden below sm, so it never rides a swipe, and at ≥sm the card's overflow
stays visible for it and its focus ring.

Verified on the merged tree — phone (390px, real touch events): card travels
37 → -161 → -71 while the title holds at x=70, and the swipe's Archive tap
takes the card off the board with an Undo pill. Desktop (1440px): overflow
visible, no transform on the content, hover Archive still archives with undo,
card still opens the panel. tsc, 11 suites, prod build (128kB held).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017bGaSfKWDhbBcUXH8nLP6g
@carlitoswillis
carlitoswillis merged commit 84c58b9 into main Aug 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants