fix reposition of popover when window resize#32492
Conversation
|
gentle bump @akinwale for review |
Apologies for the delay. I will review today. |
|
Reviewing now. @ishpaul777 Please resolve merge conflicts. |
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / Safari32492-web.mp4MacOS: Desktop32492-desktop.mp4 |
|
@ishpaul777 The repositioning doesn't seem to be working properly on web and desktop when I drag the window to resize. Please check this. See attached video. 32492-desktop-bug.mp4 |
|
I am not able to reproduce this, sometimes when there is a delay in app layout resizing and popover get its position sligtly wrong because it's present at right most part of app and because of delay there's space (white space if you notice) available in window as popover position is absolute to widow, i guess this a performance issue depend on user device or browser performace. Screen.Recording.2023-12-15.at.4.24.29.PM.movScreen.Recording.2023-12-15.at.4.30.18.PM.mov |
|
@akinwale Can you check if its better that before i used Screen.Recording.2023-12-15.at.5.34.01.PM.movScreen.Recording.2023-12-15.at.5.26.27.PM.mov |
|
@ishpaul777 I'm still seeing the same issue when dragging the window. The issue is not solved until we can ensure that the popover is properly repositioned after the window resize is complete, since that is the main goal here. |
|
@akinwale Actually it does if you see #32492 (comment), i am not able to reproduce like #32492 (comment).... any ideas what might be wrong with code because i follow the standard pattern we use across all popovers, nothing fancy? |
|
@ishpaul777 I have tested again on a different machine with better performance and it looks like the issue is solved. Please fix merge conflicts so that I can approve. Thanks. |
|
Thanks @akinwale Glad that it's resolved I'll do that As soon as i am with my machine 💻(in few hours or by tomorrow) |
|
@ishpaul777 Looks like the PR author checklist was updated. You can update the first post with the updated checklist from https://github.com/Expensify/App/main/.github/PULL_REQUEST_TEMPLATE.md. |
|
✋ 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/francoisl in version: 1.4.21-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.21-4 🚀
|
1 similar comment
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.21-4 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.21-4 🚀
|
| } | ||
| setMenuPosition(); | ||
| }, [shouldListenForResize, setMenuPosition]); | ||
| const popoverPositionListener = Dimensions.addEventListener('change', () => { |
There was a problem hiding this comment.
This change caused some de-sync between dimension calculation when resized quickly, which caused #61801




Details
Fixed Issues
$ #31706
PROPOSAL: #31706 (comment)
Tests
Offline tests
QA Steps
Preconditon - have atleast a bank account added.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.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 so 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
N/a window cant be resized
Android: mWeb Chrome
N/a window cant be resized
iOS: Native
N/a window cant be resized
iOS: mWeb Safari
N/a window cant be resized
MacOS: Chrome / Safari
Screen.Recording.2023-12-05.at.10.30.04.PM-1.mov
MacOS: Desktop
Screen.Recording.2023-12-05.at.11.12.27.PM-1.mov