Skip to content

feat(board): detent horizontal board scroll to each column on mobile#51

Merged
bryankennedy merged 1 commit into
mainfrom
feat/board-column-scroll-snap
Jul 4, 2026
Merged

feat(board): detent horizontal board scroll to each column on mobile#51
bryankennedy merged 1 commit into
mainfrom
feat/board-column-scroll-snap

Conversation

@exe-dev-github-integration

Copy link
Copy Markdown
Contributor

Why

On a phone the board columns hit their min-w-72 floor 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

  • Board row is snap-x snap-mandatory; each column is a snap-start point → a swipe always settles with one column pinned to the left edge.
  • snap-start (not center): a left-to-right board reads like flipping pages, next column peeking in on the right.
  • mandatory (not proximity): a firm home for every scroll.
  • No column-width change — snapping is purely additive to the existing layout.
  • Suppressed mid-drag (gated on 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, 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.

Testing

tsc -b clean. Verified in WebKit (Playwright) at a 390px iPhone viewport: scroll-snap-type: x mandatory, columns report snap-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 a docs/DECISIONS.md entry 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.

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 bryankennedy merged commit 3fe3549 into main Jul 4, 2026
2 checks 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.

1 participant