Commit graph

2 commits

Author SHA1 Message Date
Maaxxs
eba15ef52b Make light wheel scrolls on the tile row commit to the next card
Client feedback: a light/small scroll snapped back to the current card
instead of advancing - native scroll-snap always settles on whichever
card is nearest, and a light nudge rarely crosses the halfway point.

Each wheel burst now tracks its starting card index and net deltaY.
On settle, if the nearest card by position is still the start card but
there was clear directional movement (>4px net), the row advances one
card in that direction instead of springing back - so even a light
wheel tick pages forward. Larger scrolls are unaffected: if the actual
scroll position already lands closer to a farther card, it jumps
straight there (no artificial one-card-per-burst cap), and a burst that
nets out near zero (e.g. wiggling back and forth) correctly stays put.
The settle target is computed the same way the old drag-to-scroll
feature centered cards, and re-enables scroll-snap only after the
settling scrollTo animation would have finished, so it doesn't fight
the smooth scroll.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 22:30:16 +02:00
Maaxxs
eb59e9c1c9 Add mouse-wheel scrolling to the package tile row
Client feedback: after removing mouse-drag on the coverflow (it fought
the 3D transform), the thin scrollbar underneath was the only desktop
way to browse tiles - too fiddly.

Hovering the tile row and scrolling the wheel now moves the row
horizontally, fluid/1:1 with the wheel delta rather than snapping one
card per tick, with scroll-snap briefly suspended during the burst and
re-enabled ~150ms after the last tick so cards settle into place
afterward - the same pattern already used for the old drag interaction.

At the first card, scrolling further "up" is left alone (no
preventDefault): the event falls through to native behavior, which is
already exactly how the page scrolls today when hovering the row, so
the page scrolls up instead. Same at the last card scrolling "down" -
the page takes over. Horizontal wheel/trackpad sideswipe (deltaX) is
untouched, since the container already handles that natively. Applies
uniformly to both strip and coverflow (same scrollerRef container); the
scrollbar stays as-is.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 21:24:28 +02:00
Renamed from hifi/assets/index-D7QmGTZX.js (Browse further)