feat(board): detent horizontal board scroll to each column on mobile#51
Merged
Conversation
On a phone the columns hit their min-w-72 floor and the board scrolls sideways; a swipe used to rest anywhere, leaving two column halves on screen. Make the row scroll-snap x-mandatory with each column a snap-start point, so a horizontal swipe always settles with one column pinned to the left edge — each column becomes a "home" for the scroll. - snap-start (not center): a left-to-right board reads like flipping pages. - mandatory (not proximity): a firm home for every scroll, as asked. - No column-width change; snapping is purely additive. - Suppressed while a card is being dragged (gated on activeId): the drag edge auto-scroll scrolls this same row programmatically and mandatory snap fights it, stuttering the auto-scroll toward the target column. On drop, activeId clears and the row re-snaps to the nearest column. - No-op on desktop, where flex-1 fits every column and the row never overflows. Verified in WebKit at 390px: a partial nudge settled exactly on a column edge (0px delta) with zero page overflow. Documented in REFERENCE (board) and DECISIONS.
bryankennedy
approved these changes
Jul 4, 2026
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.
Why
On a phone the board columns hit their
min-w-72floor and the row scrolls sideways. A swipe used to rest anywhere, leaving you staring at two half-columns. This makes the horizontal scroll detent so each column is a "home" position.What
snap-x snap-mandatory; each column is asnap-startpoint → a swipe always settles with one column pinned to the left edge.activeId): the card-drag edge auto-scroll (PROG-47/48) scrolls this same row programmatically, and mandatory snap fights it — re-snapping after each step and stuttering the auto-scroll. On drop,activeIdclears and the row re-snaps to the nearest column.flex-1fits every column and the row never overflows.Testing
tsc -bclean. Verified in WebKit (Playwright) at a 390px iPhone viewport:scroll-snap-type: x mandatory, columns reportsnap-align: start, a partial nudge settled exactly on a column edge (0px delta), and zero page horizontal overflow.Docs
Updated
docs/REFERENCE.md(board section) and appended adocs/DECISIONS.mdentry covering the snap-start / mandatory / mid-drag-suppression choices.Design choices confirmed with the owner
Snap position left edge, column width unchanged (~288px floor), detent strength mandatory.