Skip to content

Stop doubling the bottom safe area padding on the Uber send invites page - #103296

Merged
NicolasBonet merged 2 commits into
Expensify:mainfrom
oqildev:fix/99763-receipt-partners-invite-bottom-padding
Oct 14, 2026
Merged

NicolasBonet merged 2 commits into
Expensify:mainfrom
oqildev:fix/99763-receipt-partners-invite-bottom-padding

Conversation

@oqildev

@oqildev oqildev commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

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:

  1. The page's ScreenWrapper was left in legacy safe area mode, so ScreenWrapperContainer rendered its own bottom inset spacer.
  2. The Confirm button is the SelectionList footer (FixedFooter with addBottomSafeAreaPadding). It adds the raw inset again, because that path does not check whether a parent already applied it.

That left pb5 + inset + inset under the button. This PR passes enableEdgeToEdgeBottomSafeAreaPadding to that ScreenWrapper, 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:

  • The "All set" branch of the same page stays in legacy mode. It renders ConfirmationPage, whose footer does not add the inset itself and relies on the ScreenWrapper spacer. Switching it to edge-to-edge would remove the only inset and put the button on the home indicator.
  • Manage invites has no footer and already applies the inset once.

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 on main because the ScreenWrapper spacer reserves it too. On "All set" it has to be the ScreenWrapper spacer 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.

  1. Open a workspace you are an admin of, go to More features and enable Receipt partners.
  2. Open the Send invites page:
    • With an Uber for Business account: go to Receipt partners, press Connect next to Uber for Business and finish the connection. The app lands on Send invites.
    • Without one: open the route directly. Web / mWeb: /workspaces/<policyID>/receipt-partners/uber/invite. Native: new-expensify://workspaces/<policyID>/receipt-partners/uber/invite.
  3. On Android and iOS native, verify the space below the Confirm button is not oversized and matches the space below Next on Members > Invite member.
  4. On web and mWeb, verify the page looks the same as before. There is no bottom safe area inset in the browser, so nothing changes visually.
  • Verify that no errors appear in the JS console

Offline tests

  1. Open the Send invites page as described above.
  2. Go offline.
  3. Verify "You appear to be offline." is shown below the Confirm button and does not overlap it.

QA Steps

Prerequisite: an Uber for Business account that can be connected to the workspace.

  1. Open a workspace you are an admin of, go to More features and enable Receipt partners.
  2. Go to Receipt partners, press Connect next to Uber for Business and finish the connection.
  3. On the Send invites page, verify on Android and iOS native that the space below the Confirm button is consistent with other pages, for example the Next button on Members > Invite member.
  4. Press Confirm and verify that on the All set page the Confirm button still keeps its space from the bottom of the screen.
  5. Open Manage invites and verify the page looks the same as before.
  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

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

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.
@oqildev
oqildev marked this pull request as ready for review October 7, 2026 09:13
@oqildev
oqildev requested review from a team as code owners October 7, 2026 09:13
@melvin-bot
melvin-bot Bot requested review from dylanexpensify and mananjadhav and removed request for a team October 7, 2026 09:13
@melvin-bot

melvin-bot Bot commented Oct 7, 2026

Copy link
Copy Markdown

@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
dylanexpensify previously approved these changes Oct 7, 2026

@dylanexpensify dylanexpensify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from a product perspective 👍

expect(screen.getByText(headerTitle)).toBeOnTheScreen();
});

const totalBottomPadding = screen

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 mananjadhav left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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 mananjadhav left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes and tests look good.

Working on the checklist.

@mananjadhav

mananjadhav commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp android-receipt-padding
Android: mWeb Chrome mweb-chrome-receipt-padding
iOS: HybridApp ios-receipt-padding
iOS: mWeb Safari mweb-safari-receipt-padding
MacOS: Chrome / Safari image

@melvin-bot
melvin-bot Bot requested a review from NicolasBonet October 14, 2026 18:31

@NicolasBonet NicolasBonet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: Please adjust the explanation of changes for the reader, that is way too much for the little changes we are introducing.

@NicolasBonet
NicolasBonet merged commit a200f4c into Expensify:main Oct 14, 2026
36 of 45 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚧 NicolasBonet has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/NicolasBonet in version: 9.5.10-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

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.


view run

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/NicolasBonet in version: 9.5.12-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

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.


view run

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/cristipaval in version: 9.5.12-1 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants