-
-
Notifications
You must be signed in to change notification settings - Fork 527
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
feat: proper snapshot when having multiple modals #2121
Conversation
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.
Notes
if (_presentedModals.count < 2) { | ||
_snapshot = [_controller.visibleViewController.view snapshotViewAfterScreenUpdates:NO]; | ||
} else { | ||
_snapshot = [[_presentedModals.lastObject view] snapshotViewAfterScreenUpdates:NO]; | ||
} |
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, I see.
There, most likely, still will be an issue when we dismiss a modal from different stack. I believe you can test this on Test1829
(if not present in FabricTestExample
it is in TestsExample
).
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.
Yep, it does not work in such case, do we want to handle it right now?
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 think we won't be really able to come up with anything different that a heuristic solution before we do proper modal presenting logic refactor.
Let's proceed now, I'll create note on our task board so that this is not forgotten.
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.
Answered your question
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.
🤦🏻♂️ Now, I've answered the question
if (_presentedModals.count < 2) { | ||
_snapshot = [_controller.visibleViewController.view snapshotViewAfterScreenUpdates:NO]; | ||
} else { | ||
_snapshot = [[_presentedModals.lastObject view] snapshotViewAfterScreenUpdates:NO]; | ||
} |
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 think we won't be really able to come up with anything different that a heuristic solution before we do proper modal presenting logic refactor.
Let's proceed now, I'll create note on our task board so that this is not forgotten.
Description
PR handling setting a proper snapshot of a modal when it is dismissed from JS on new arch. Still does not work with
Test1829
Changes
Test code and steps to reproduce
Checklist