Repository navigation
feat: use floating RHP style on web - #101093
Conversation
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.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
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
|
🚧 shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
🚧 shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
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.
|
🚧 shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
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.
|
|
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.
|
🚧 shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
🚧 shawnborton has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
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. |
|
@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. |
|
@mountiny all yours |
|
@BartekObudzinski Please resolve the merge conflicts |
…-100811 # Conflicts: # src/components/Modal/BaseModal.tsx
|
Resolved @huult |
mountiny
left a comment
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
| // 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 has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.4.96-0 🚀
|
|
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. |
|
Deploy Blocker #102610 was identified to be related to this PR. |
|
Deploy Blocker #102622 was identified to be related to this PR. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.4.99-0 🚀
|
|
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 |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.4.99-2 🚀
Bundle Size Analysis (Sentry): |
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.rhpOverlayatvariables.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
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.
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 the components usingAvatarare working as expected)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
Screen.Recording.2026-09-17.at.12.52.00.mov
Screen.Recording.2026-09-17.at.12.56.11.mov