Skip to content

feat: use floating RHP style on web - #101093

Merged
mountiny merged 33 commits into
Expensify:mainfrom
callstack-internal:web-only-plan-issue-100811
Sep 29, 2026
Merged

mountiny merged 33 commits into
Expensify:mainfrom
callstack-internal:web-only-plan-issue-100811

Conversation

@BartekObudzinski

@BartekObudzinski BartekObudzinski commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

On wide screens the RHP now floats as a card. It sits 12px from the top, right and bottom of the window, with rounded corners, a 1px border and a shadow.

The dim behind it uses a new lighter colour, theme.rhpOverlay at variables.rhpOverlayOpacity, instead of the standard overlay. The dim for the wide and super wide cards got the same inset, so it stops where the card stops instead of spreading into the gap around it.

On narrow screens and on native, nothing changes. The RHP stays full-screen there.

Fixed Issues

$ #100811
PROPOSAL:

Tests

  1. Open the app in a browser on a wide screen (over about 1000px).
  2. Open any RHP, for example Avatar > Profile. Check that it floats: a gap from the top, right and bottom edges, rounded corners, a border and a shadow.
  3. Check the dim behind the RHP is lighter than before and stops at the window edges.
  4. Open an expense with the wide RHP (the receipt pane on the left), then open another RHP page on top. Check that the dim over the card underneath lines up with that card's edges and does not spill into the gap around it.
  5. Open a super wide RHP (a report in the expanded view) and repeat step 4.
  6. Shrink the window to a narrow screen. Check the RHP goes back to full screen, with no gap, no rounded corners and no shadow.
  7. Repeat steps 2 to 5 in dark mode. Check the dim, border and shadow still look right.
  8. Open the same RHPs on Android native, iOS native, mWeb Chrome and mWeb Safari. Check nothing changed there.
  • Verify that no errors appear in the JS console

Offline tests

This change only affects how the RHP looks. It does not depend on the network. Turn off your connection, open any RHP on a wide screen, and check the card and its dim look the same as online.

QA Steps

Same as tests.

  • 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 the components using Avatar are working as expected)
  • 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.
  • 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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-09-17.at.12.52.00.mov
Screen.Recording.2026-09-17.at.12.56.11.mov

Inset the RHP from the viewport edges with rounded corners, a 1px border and a shadow, and lighten its scrim. Web wide layout only; narrow layout and native keep the current full-bleed frame.
@BartekObudzinski BartekObudzinski changed the title feat: use floating RHP style on web [WIP] feat: use floating RHP style on web Sep 14, 2026
@codecov

codecov Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Give each RHP card stacked inside the floating frame its own radius, 1px border and shadow, so the side facing the wider card underneath is rounded instead of square. Drop the double 12px inset on the wide RHP secondary overlays, which left an undimmed band behind those corners.
…-100811

# Conflicts:
#	src/styles/theme/themes/dark.ts
#	src/styles/theme/themes/light.ts
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

This comment has been minimized.

The RHP screen renders position:fixed, which the frame's overflow:hidden does not clip unless the frame is a containing block. Compose translateZ0 into the web frame so the card keeps its rounded corners and bottom inset.
An RHP pushed while a centered wide or super-wide card is in context now animates with the same subtle slide-and-fade as the centered cards, instead of a full-width slide from the screen edge.
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

This comment has been minimized.

@react-navigation/stack wraps non-top cards with overflow:hidden (only the top card is active), which clips the drop shadow of a card sitting under the focused one. Add a keepCardOverflowVisible screen option (react-nav patch 005) set on the RHP navigator, and stop the wide card interpolator from re-clipping its own container.
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This PR is possibly changing native code and/or updating libraries, it may cause problems with HybridApp. Please check if any patch updates are required in the HybridApp repo and run an AdHoc build to verify that HybridApp will not break. Ask Contributor Plus for help if you are not sure how to handle this. ⚠️

The RHP draws its own scrim (BaseOverlay), so react-navigation's built-in animated card overlay adds a second dark backdrop that fades in before the card slides. Turn it off in the RHP modal stack and the root navigator's right-modal entry to match the wider modals. Also link upstream issue Expensify#13254 in the keep-card-overflow-visible patch details.
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

This comment has been minimized.

@shawnborton

Copy link
Copy Markdown
Contributor

Overall feeling really good to me, just one small update we need to make so that we don't duplicate the RHP shadow when multiple small RHPs are stacked.

@BartekObudzinski

Copy link
Copy Markdown
Contributor Author

@grgia Good catch, fixed. Right docked sheets outside the RHP now use rhpOverlayOpacity on wide web, so they dim the same as the RHP. The backdrop fade now animates to that value too, otherwise it jumped from 0.72 to 0.5 on open.

grgia
grgia previously approved these changes Sep 28, 2026

@grgia grgia 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.

Thank you! LGTM

@grgia

grgia commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

@mountiny all yours

@huult

huult commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

@BartekObudzinski Please resolve the merge conflicts

…-100811

# Conflicts:
#	src/components/Modal/BaseModal.tsx
@BartekObudzinski

Copy link
Copy Markdown
Contributor Author

Resolved @huult

@mountiny mountiny 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.

Nice one, thanks for this!

// Pressing the dimmed gap around the focused card goes back one level when a card is stacked below, and closes the RHP when it is not.
const floatingCardGapProgress = shouldRenderTertiaryOverlay ? thirdOverlayProgress : undefined;
const handleFloatingCardGapPress = shouldRenderTertiaryOverlay ? Navigation.dismissToPreviousRHP : handleOverlayPress;
// The gap on the right stops before the Side Panel, which shares that edge.

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.

Suggested change
// The gap on the right stops before the Side Panel, which shares that edge.
// The gap on the right stops before the Side Panel, which shares that edge.

@mountiny
mountiny merged commit 2b08bf8 into Expensify:main Sep 29, 2026
43 of 44 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚧 mountiny 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/mountiny in version: 9.4.96-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update is needed. This PR only changes how the right-hand panel looks on wide screens (a floating card with a gap, rounded corners, a shadow, and a lighter dim). The panel's contents, position, and labels stay the same, so every article step that says "In the right-hand panel, click …" is still correct.


view run

@mitarachim

Copy link
Copy Markdown

Deploy Blocker #102610 was identified to be related to this PR.

@mitarachim

Copy link
Copy Markdown

Deploy Blocker #102622 was identified to be related to this PR.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/mountiny in version: 9.4.99-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update needed. This PR only changes how the right-hand panel looks on wide web screens (inset, rounded corners, border, shadow, lighter dim), so no sentence in docs/articles becomes wrong. Articles that say "In the right-hand panel, click…" stay accurate.


view run

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/Julesssss in version: 9.4.99-2 🚀

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.