[MOO-2404] - fix intro screen - main - #577
Open
YogendraShelke wants to merge 1 commit into
Open
Conversation
YogendraShelke
force-pushed
the
moo/MOO-2404-intro-screen-main
branch
from
July 29, 2026 15:49
7804e79 to
195d9ba
Compare
YogendraShelke
force-pushed
the
moo/MOO-2404-intro-screen-main
branch
from
July 30, 2026 03:28
c92d06b to
c0c1832
Compare
YogendraShelke
force-pushed
the
moo/MOO-2404-intro-screen-main
branch
5 times, most recently
from
August 3, 2026 11:20
0e806d8 to
dbed74f
Compare
YogendraShelke
force-pushed
the
moo/MOO-2404-intro-screen-main
branch
from
August 3, 2026 17:33
dbed74f to
e375e11
Compare
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.
Problem
Three defects in how the IntroScreen decided which slide was showing:
FINISHbutton.Root cause
The widget was working out for itself which gesture phase ended a swipe. It rounded
contentOffset.x / widthinonMomentumScrollEndand gated that behind a hand-keptisInitializinglatch. Both halves were wrong:slide !== activeIndexbranch. Start with the attribute agreeing with the slide the widget opens on and that branch never runs, so the latch is never cleared, so the first swipe is swallowed — and the sync effect then scrolls back, reverting the slide the user swiped to.Separately,
@shopify/flash-list2.x enablesmaintainVisibleContentPositionby default. It anchors the list to whichever item was first visible and, whenever a re-render moves that item, scrolls back by the difference. Navigating re-renders the slides, so that correction silently undid thescrollToOffsetingoToSlide— state advanced, pixels did not. Confirmed on-device: aftergoToSlide(2)requested offset 822.86 (valid — content width 1234),onScrollreported x=0. Not a clamp, which would have given 411.Fix
Which slide is showing is asked of the list through
onViewableItemsChangedinstead of inferred from offsets and gesture phases. flash-list computes viewability inside its own scroll handling, so a drag lifted with no velocity is reported like any other arrival, andwaitForInteraction: truesupplies the "not the initial scroll" distinction the widget was keeping by hand — flash-list already withholds reports until the first real interaction (RecyclerView.tsxonly callsrecordInteraction()onceisInitialScrollComplete).itemVisiblePercentThreshold: 60is unambiguous because slides are exactly one window wide;minimumViewTime: 250keeps positions merely passed through from counting as arrivals.Four gesture handlers, a manual dragging flag and a settle-timeout fallback are replaced by one handler.
Also in the same sync path:
maintainVisibleContentPositiondisabled — paged slides are all one window wide and every position here is asked for explicitly, so there is nothing to preserve.onLayoutreports a width, with a measuring placeholder before that.initialScrollIndexwas passed the live active index, so flash-list's post-mount re-apply raced our ownscrollToOffset. The slide the list opens on is frozen once mounted.Also in this PR
Maestro e2e. Swipes use explicit start/end points inside the slide: an edge-anchored swipe loses travel to the system back gesture, and the backward one fell short of halfway and snapped back to where it started — a flake independent of the widget fix.
NEXTis what becomesFINISHon the last slide, so the flow now waits for the slide before reaching for the button.