[CP Staging] fix: consume insets in Modals anyway because they are mounted in different native view hierarchy#53440
Conversation
…erent native view hierarchy
|
@rayane-djouah Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
🚧 @mountiny has triggered a test build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
Reviewer Checklist
Screenshots/VideosiOS: mWeb Safari2024-12-03.19.04.52.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
[CP Staging] fix: consume insets in Modals anyway because they are mounted in different native view hierarchy (cherry picked from commit 072b2a6) (CP triggered by puneetlath)
|
🚀 Cherry-picked to staging by https://github.com/puneetlath in version: 9.0.70-8 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.0.70-9 🚀
|





Explanation of Change
In #53250 we introduced a concept, where we consume insets, and if insets are consumed we don't send them to "nested" screen layout.
It works well for plain screens, but doesn't work for
Modal, becauseModals are redered separately in native view hierarchy.In #53250 I applied a quick fix and consumed insets directly, however I think such approach is a little bit incorrect, because for each Modal screen we would have to add this code (but the original idea was to control paddings via
ScreenWrapperprops).In this PR I slightly change the approach and if we detect, that screen is nested in
Modal, then we don't react on flags whether insets were consumed or not and always apply padding. In this case props forScreenWrapperworks as it would be a plain screen.Fixed Issues
$ #53423
PROPOSAL: N/A
Tests
ValidateCodeActionModalscreen and be sure bottom/top paddings are applied correctly (appears if you register a new user and try to perform steps that requires email verification - for example creating a workspace/linking bank account)Offline tests
N/A
QA Steps
ValidateCodeActionModalscreen and be sure bottom/top paddings are applied correctly (appears if you register a new user and try to perform steps that requires email verification - for example creating a workspace/linking bank account)PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop