Repository navigation
Stop doubling the bottom safe area padding on the Uber send invites page - #103296
NicolasBonet merged 2 commits into
Conversation
The Send invites ScreenWrapper was left in legacy safe area mode, so it rendered its own bottom inset spacer while the confirm button footer of the SelectionList added the same inset again. On native that left an oversized gap below the Confirm button. The list ScreenWrapper now uses edge-to-edge mode, which drops the legacy spacer and leaves the footer as the only place that adds the inset, like on the workspace member invite page. The "All set" branch stays in legacy mode on purpose. ConfirmationPage's footer does not add the inset itself, so it still needs the ScreenWrapper spacer to keep the button above the home indicator. The new tests cover both branches.
|
@mananjadhav 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] |
dylanexpensify
left a comment
There was a problem hiding this comment.
Looks good from a product perspective 👍
| expect(screen.getByText(headerTitle)).toBeOnTheScreen(); | ||
| }); | ||
|
|
||
| const totalBottomPadding = screen |
There was a problem hiding this comment.
question: The assertion sums every numeric paddingBottom under the screen. It checks the total gap, not that the footer owns the inset. Removing addBottomSafeAreaPadding from the list would also leave a single inset (on the legacy spacer) and the Send invites test would still pass.
There was a problem hiding this comment.
You're right, the sum only proved the inset is added once, not where it lives. I reworked both cases in 37377aa: each one now finds the views that reserve room for the inset and checks whether they hold the Confirm button. On Send invites it has to be the footer alone, on All set the ScreenWrapper spacer alone.
I also ran the scenario you described (legacy wrapper, no addBottomSafeAreaPadding on the list). The Send invites test fails there now, because the only view left with the inset is the spacer.
| return total + style.paddingBottom; | ||
| }, 0); | ||
|
|
||
| unmount(); |
There was a problem hiding this comment.
Each case renders the page twice and only unmounts after a successful waitFor. A failed wait leaves the first tree mounted for the second render.
There was a problem hiding this comment.
Fixed in 37377aa as well. Each case renders the page once now, so the manual unmount is gone and RNTL's automatic cleanup takes care of the tree even when a waitFor fails.
mananjadhav
left a comment
There was a problem hiding this comment.
@oqildev The code change is fine, left 2 comments on tests.
…e tests The tests summed every bottom padding on the screen, so they only proved the inset was added once. Leaving the ScreenWrapper in legacy mode and dropping addBottomSafeAreaPadding from the list would have passed too, although the inset would then sit on the wrapper spacer instead of the footer. Each case now finds the views that reserve room for the inset and checks whether they hold the confirm button: on Send invites it has to be the footer alone, on All set the ScreenWrapper spacer alone. The page is rendered once per case, so the manual unmount between two renders is gone.
mananjadhav
left a comment
There was a problem hiding this comment.
Code changes and tests look good.
Working on the checklist.
Reviewer Checklist
Screenshots/Videos |
NicolasBonet
left a comment
There was a problem hiding this comment.
NIT: Please adjust the explanation of changes for the reader, that is way too much for the little changes we are introducing.
|
🚧 NicolasBonet has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/NicolasBonet in version: 9.5.10-0 🚀
|
|
No help site update needed. This PR only fixes the extra space below the Confirm button on the Uber for Business Send invites page on native. It doesn't change any feature, label, step, or behavior that an article describes. |
|
🚀 Deployed to staging by https://github.com/NicolasBonet in version: 9.5.12-0 🚀
|
|
No help site update needed. This PR only fixes the extra space below the Confirm button on the Uber for Business Send invites page on native. It doesn't change any feature, label, step, or behavior that an article describes. |
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.5.12-1 🚀
Bundle Size Analysis (Sentry): |





Explanation of Change
On the Uber for Business Send invites page the bottom safe area inset was applied twice below the Confirm button on native:
ScreenWrapperwas left in legacy safe area mode, soScreenWrapperContainerrendered its own bottom inset spacer.SelectionListfooter (FixedFooterwithaddBottomSafeAreaPadding). It adds the raw inset again, because that path does not check whether a parent already applied it.That left
pb5 + inset + insetunder the button. This PR passesenableEdgeToEdgeBottomSafeAreaPaddingto thatScreenWrapper, which drops the legacy spacer and leaves the footer as the only place that adds the inset. It is the same setup the workspace member invite page (DynamicWorkspaceInvitePage) already uses.Two places are intentionally left alone:
ConfirmationPage, whose footer does not add the inset itself and relies on theScreenWrapperspacer. Switching it to edge-to-edge would remove the only inset and put the button on the home indicator.Measured on a Pixel 7 emulator (1080×2400, 420 dpi), the space below Confirm goes from 179 px to 116 px, which is exactly where the Next button sits on Members > Invite member.
Two unit tests were added to
tests/ui/WorkspaceReceiptPartnersTest.tsx. They find the views that reserve room for the bottom inset and check which one holds the Confirm button. On Send invites it has to be the footer alone, which fails onmainbecause theScreenWrapperspacer reserves it too. On "All set" it has to be theScreenWrapperspacer alone, which fails if the prop is also added to that branch.Fixed Issues
$ #99763
PROPOSAL: #99763 (comment)
Tests
The Send invites page normally opens right after connecting Uber for Business. I don't have an Uber for Business account, so I opened the page through its route once Receipt partners was enabled. The page renders the same way either way.
/workspaces/<policyID>/receipt-partners/uber/invite. Native:new-expensify://workspaces/<policyID>/receipt-partners/uber/invite.Offline tests
QA Steps
Prerequisite: an Uber for Business account that can be connected to the workspace.
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.native_space.mp4
Android: mWeb Chrome
android.mweb.mp4
iOS: Native
ios-native-space.mp4
iOS: mWeb Safari
ios-mweb.MOV
MacOS: Chrome / Safari
web.chrome.space.mp4