Fix HeaderWithBackButton header buttons remounts which causes modals closing on orientation change#96403
Conversation
|
@Expensify/design as discussed here I'm trying to fix popovers/modals closing on orientation/layout change on mobile and web, but to fix it in the simplest way possible I have to attach the buttons (and in this new Rules screen case tab selector) to the header, so that it does not scroll with the rest on the page like we currently do. Basically all buttons that are displayed in the header row in wide layout, but we display below the header in narrow layout will be fixed at the top below the header. I want to confirm if that's ok to you. Example (here tab selector and Add rule is always at the top of the screen, but currently on prod tab selector and Add rule would scroll with the rest of the screen): Screen.Recording.2026-07-17.at.15.34.19.movAnother example with comparison (with changes vs current prod): Screen.Recording.2026-07-17.at.16.44.56.movScreen.Recording.2026-07-17.at.16.45.29.mov |
|
Hmm I don't love the idea of eating up more fixed space that can't scroll, if that is what you are suggesting that we would do? |
|
Agree with that Shawn. This might be a bad line of thought but how often do we think people are opening a modal and then changing orientations? Is it even worth it to make sure the modals don't close? |
Explanation of Change
Updates
HeaderWithBackButtonto keep responsive header actions mounted while moving them between header row and below the header, preventing open dropdowns from losing state during orientation changes. AddingbottomContenttoHeaderWithBackButtonto allow putting tabs row on the new Workspace Rules page (PolicyRulesPageRevamp) between header buttons when they are shown below the header (to keep the current layout)Discussed here
Fixed Issues
$ #77280 and discussed here
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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