PopoverWithMeasuredContent optimization for mobile#68223
PopoverWithMeasuredContent optimization for mobile#68223mountiny merged 10 commits intoExpensify:mainfrom
Conversation
|
@ZhenjaHorbach 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] |
|
Hey @ZhenjaHorbach this is pretty much unchanged from 1st PR... I cannot repro the bug that caused the revert, but not 100% sure how we should proceed here? Maybe get ad hoc builds and test again ? |
Actually I also couldn't reproduce this issue before I will ask in Slack |
|
🚧 @mollfpr has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
hey @jasperhuangg you were able to reproduce this issue. Can you check on ad-hoc build plz ? |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreenrecorder-2025-08-21-13-35-04-238.mp4Android: mWeb ChromeScreenrecorder-2025-08-21-13-37-32-278.mp4iOS: HybridAppios.MP4iOS: mWeb Safariios-web.MP4MacOS: Chrome / Safariweb.movMacOS: Desktopweb.mov |
|
Found this 2025-08-21.13.09.15.mp4 |
And in this PR I can't reproduce this issue also |
|
Hi @m-natarajan, The original PR was reverted which caused this issue, and this new version includes a fix. It looks like you were able to reproduce the problem earlier here. |
for this one looking if there is an ez fix now EDIT: cannot repro :( this is android chrome right ? |
Yeah, in the code the |
No |
|
Which ios version ? Simulator.Screen.Recording.-.iPhone.13.-.2025-08-22.at.12.24.24.mp4 |
I have a beta 26 |
|
Hey I'll be OOO till 08.09, during this time @blazejkustra will be monitoring this one. |
@m-natarajan |
|
@mountiny |
|
🚧 @mountiny 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, Desktop, and Web. Happy testing! 🧪🧪
|
|
Asked QA team here |
|
Not reproducible on iPhone 16/18.3.1 build v9.2.3-0 PR:68223 Ad-Hoc ScreenRecording_09-10-2025.13-15-45_1.MP4 |
|
In this case, LGTM! |
|
@jmusial @ZhenjaHorbach can you please check the reasure failure? maybe we need to adjust mocks |
I merged main and it's passing on my local ... Pipeline shows merge conflict with EDIT: ok, there is a percentage diff again - looking into it now, although so far passes on my local ;( |
|
Ok, I checked and there is indeed an extra render that is a result of adding a const {isSmallScreenWidth} = useResponsiveLayout();
if (isSmallScreenWidth) {in Given that reported render duration is flat 0, I'd say that's ok, what do you think @mountiny ? - [ReportActionCompose] should press create button [render]: 0.0 ms → 0.0 ms | 4 → 5 (+1, +25.0%) 🔴 |
mountiny
left a comment
There was a problem hiding this comment.
Just a small NAB, you can address that in another PR.
Yeah seems like the extra render is expected here but it should not cause pref regression so moving this ahead
|
|
||
| /** | ||
| * Logic for PopoverWithMeasuredContent is in PopoverWithMeasuredContentBase. | ||
| * This component is a perf optimization, it return BOTTOM_DOCKED early, for small screens avoiding Popover measurement logic calculations. |
There was a problem hiding this comment.
I think this reads better
| * This component is a perf optimization, it return BOTTOM_DOCKED early, for small screens avoiding Popover measurement logic calculations. | |
| * This component is a perf optimization, it returns a BOTTOM_DOCKED modal early for small screens, avoiding Popover measurement logic calculations. |
|
✋ 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/mountiny in version: 9.2.13-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.2.13-1 🚀
|


Explanation of Change
On small screens
PopoverWithMeasuredContentreturnsBottomDockedModalin the end. This fix returnsBottomDockedModalearlier avoiding expensive position and measurement calculation logic.Cotext:
This PR was reverted in connection to #68107, adding Videos and test scenario for that case.
Fixed Issues
$ #67034
PROPOSAL:
Tests
Popover with measured content is used in various places across the whole app. For testing I picked 3 sample scenarios:
1. Dropdown button in Search Filters
2. Worspaces 3 dots menu
3. Reaction modal
4. Revert testcase
Offline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.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
0037.andorid.native.mov
Android: mWeb Chrome
0037.android.chrome.mov
iOS: Native
0037.ios.mp4
iOS: mWeb Safari
0037.ios.safari.mp4
MacOS: Chrome / Safari
0037.desktop.chrome.mov
Revert testcase videos
Android: Native
Revert.-.android.native.mov
Android: mWeb Chrome
Revery.andorid.chrome.mov
iOS: Native
Revert.-ios.native.mp4
iOS: mWeb Safari
Revert.-ios.safari.mp4