Repository navigation
Keep the Workspaces row menu attached to its button after a window resize - #105236
Conversation
…esize Co-authored-by: Maruf Sharifi <marufsharifi@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
|
The failing check is unrelated to this PR, so I didn't push a fix. Analysis: Evidence:
Next step: Rerun the failed |
|
🤖 Android test steps verification results: On Android, the Workspaces list and its three-dots menu work in portrait, and Go to workspace navigates correctly. I couldn't test the rotation steps (Android's version of a window resize) because the test environment blocks device rotation. Those steps are untested, not failed.
|
|
@MelvinBot, replace the PR Author checklist with the verified one below: PR author checklist |
|
I replaced the PR description with the version you provided.
|
|
@MelvinBot resolve the conflicts. |
…DotsMenuResizeReposition Co-authored-by: Maruf Sharifi <marufsharifi@users.noreply.github.com> # Conflicts: # src/components/Tables/WorkspaceListTable/WorkspaceRowThreeDotsMenu.tsx
|
I resolved the merge conflict by merging The only conflict was in
|
|
No fix needed. All code checks now pass on the latest commit ( The only failing check is Details
|
|
@MelvinBot mark this as ready to review |
|
This PR is now marked as ready for review. |
|
@marufsharifi 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] |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
| }; | ||
|
|
||
| useImperativeHandle(threeDotsMenuRef as React.RefObject<{hidePopoverMenu: () => void; isPopupMenuVisible: boolean; onThreeDotsPress: () => void}> | undefined, () => ({ | ||
| const updateMenuPosition = () => { |
There was a problem hiding this comment.
❌ CONSISTENCY-3 (docs)
The new updateMenuPosition function duplicates the exact guard-and-measure logic already present in the useLayoutEffect below it: both check if (!getMenuPosition || !isPopupMenuVisible) return; and then call getMenuPosition().then((value) => setPosition(value)). Keeping two copies of this reposition logic means a future change (e.g. to the guard or to how the measured value is applied) has to be made in both places.
Have the effect reuse the function instead of re-implementing it:
const updateMenuPosition = () => {
if (!getMenuPosition || !isPopupMenuVisible) {
return;
}
getMenuPosition().then((value) => {
setPosition(value);
});
};
// ...
useLayoutEffect(() => {
updateMenuPosition();
// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps -- reposition on window/menu-state changes
}, [windowWidth, windowHeight, shouldSelfPosition, getMenuPosition, isPopupMenuVisible]);Reviewed at: 5630002 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
There was a problem hiding this comment.
|
@MelvinBot validate and address the Ai review comment. |
Co-authored-by: Maruf Sharifi <marufsharifi@users.noreply.github.com>
|
I fixed the AI review comment about duplicated code in b03b007. The comment was valid: the I left out the suggested
Codex found no issues on the previous commit. |
|
@marcochavezf 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen_Recording_20261031_131922_Expensify.Dev.mp4Android: mWeb ChromeScreen_Recording_20261031_130119_Chrome.mp4iOS: HybridAppScreen.Recording.2026-10-31.at.2.23.50.PM.moviOS: mWeb SafariScreen.Recording.2026-10-31.at.2.26.09.PM.movMacOS: Chrome / SafariScreen.Recording.2026-10-31.at.2.48.18.PM.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 marcochavezf 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/marcochavezf in version: 9.5.31-0 🚀
|
|
No help site update needed — this PR only keeps the workspace menu aligned with its button when resizing the browser, restoring expected behavior without changing any documented workflow. |
|
🚀 Deployed to staging by https://github.com/marcochavezf in version: 9.5.31-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.5.31-4 🚀
Bundle Size Analysis (Sentry): |







Explanation of Change
Previously, when the three-dot menu on the Workspaces page was open and the browser window was resized, the menu could remain in its original position instead of following its button.
This change fixes the issue by recalculating the popover's position after the workspace row is resized, ensuring the menu stays correctly aligned with its three-dot button.
Fixed Issues
$ #104764
PROPOSAL: #104764 (comment)
Tests
Offline tests
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari