-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
fix(iOS): invalid initial orientation of screen underneath full screen modal #1848
base: main
Are you sure you want to change the base?
Conversation
this PR should be merged |
18dd3d2
to
d9c3cdb
Compare
is this waiting on something in particular before it's merged and released? |
I'm also wondering: Is this going to be merged any time soon? |
This PR is waiting for me having some free throughput and finializing it. As far as I remember the solution was not perfect and didn't solve the problem completely. (you can install |
Hey, I'll look into it rn, will report back to you once I have something |
Also: If the PR in its current shape works for you, you can install
(writing from memory, lookout for typos) |
I tested it on a real device and found the exiting animation is wrong: It's going from left to right not top to bottom if you are in landscape mode. |
Would you mind providing screen recordings visualising what do you mean? As I'm testing on iPhone 12 mini right now & I do not see difference between simulator and real device. |
As you can see, if you keep your phone in landscape mode the screen (navigation.goBack) is closing from left to right (aka top->bottom in portrait mode) https://github.com/software-mansion/react-native-screens/assets/42407460/cdfb58ca-f758-4b51-b280-61296ac96b25 |
Yeah, for now it is expected (however I see why this might be a subject for change). IIRC the stack animation reflects the orientation of the screen underneath, so if it is in portrait mode, the dismissal will be top-down from the perspective of the screen underneath (looking like it's left to right from the perspective of screen in landscape mode) |
@Jpunt you can use this patch file to install the patch without needing to keep the branch updated. remember to rerun pod install :) https://gist.github.com/aleqsio/b1cb8bd24f34ed697e21b0f28a1efe68 – put this file into the patches folder. you can use patch-package for this. |
Description
In case of fullScreenModal we want to ask for orientation specifically the screen underneath,
so that when the modal is dismissed the controller underneath is already in expected orientation, without the need to first wait for the dimissal to complete and only then to rotate.
This still is not perfect, as you see the visual glitches / jumping on videos below, however it improves the situation.
Changes
Asked the screen that presents another screen in
fullScreenModal
stack presentation for interface orientation mask.Before
Simulator.Screen.Recording.-.iPhone.14.-.2023-07-31.at.10.51.05.mp4
After
Simulator.Screen.Recording.-.iPhone.14.-.2023-07-31.at.10.48.29.mp4
Test code and steps to reproduce
Test1775
in TEChecklist