-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Nicer Tabs] New native pager #6868
Conversation
|
c69d7e7
to
f2522aa
Compare
dragProgress={undefined as any /* native-only */} | ||
dragState={undefined as any /* native-only */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish there was a way to express platforms in the type system :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could probably hack something together for this in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, some sort of monad perhaps
I was trying to be too smart and this was causing the current page event to lag behind if you continuously drag. Better to let the library do its job.
Due to RN onLayout event ordering, we know that by now we'll have container and content sizes already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested for a full day and worked fine. Code lgtm
This revives #1696 but in a performant way.
Test Plan
Try different interactions on iOS and Android:
Verify non-primary cases:
Verify perf on Android and iOS devices.
Known issues:
Due to the change in [Nicer Tabs] Fork TabBar, simplify Pager #6762, there's no prewarming during swipe, so each feed loads a bit "too late" (after swipe). I'll stack something on top of this PR to resolve that, but not in scope.On Android, swipes are sometimes interpreted as taps and bring up the lightbox or navigate into the post. This is not a new issue, and has always been broken — I'll likely look at it but not today.
pager.mov