-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[WIP] Rewrite Android lightbox #1563
Conversation
return [1, 0, 0, 0, 1, 0, 0, 0, 1]; | ||
} | ||
|
||
function prependTranslate(t: Matrix3, x: number, y: number) { |
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.
Wrote these as in-place mutations to avoid allocating a bunch of stuff during gestures
src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx
Show resolved
Hide resolved
c9b2674
to
115d60d
Compare
Excellent work here, Dan. It's feeling good and consistent across devices and should set us up much better in the future! A couple of notes:
|
Still unhappy with how pan and pinch gestures compose but maybe it's not blocking. Left a comment in software-mansion/react-native-gesture-handler#2616 (comment) for the RNGH maintainers. |
As for other notes, I'll do them in a follow-up. I want this PR to just get us to the baseline with the custom implementation. I'll polish up the code and make some videos to show the difference with what we had. |
60665ec
to
3c2654a
Compare
ta[8] = a20 * tb[2] + a21 * tb[5] + a22 * tb[8]; | ||
} | ||
|
||
function readTransform(t): [number, number, number] { |
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.
t
here will be any
(and below in some following functions)
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.
yea i haven’t started fixing up types yet
}, | ||
loading: { |
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.
This is provided by RN if that's useful https://reactnative.dev/docs/stylesheet#absolutefill
e231105
to
26183ee
Compare
I'll keep this for historical reasons but will resubmit cause a rebase was too hard and I needed to restructure things anyway. |
Resubmit: #1624 |
Fixes #1485.
This is a comprehensive rewrite of the Android lightbox aligning it closer with behavior you see in stock Android apps. We're using Reanimated + RNGH since these provide more control and will let us compose with scroll views better.
Not ready for a full review yet.