Swipe the card, not the words on it - #1
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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