fix: 26178 Context menu does not close after user goes to the previous page#27268
Conversation
|
@aimane-chnaif 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] |
aimane-chnaif
left a comment
There was a problem hiding this comment.
Missing case:
Screen.Recording.2023-09-13.at.9.31.41.PM.mov
|
@aimane-chnaif Thanks for pointing that out, I think reactionListPopover belongs to ReportActionsView, that why we can't use it in NavigationRoot, so I handle hide popover in ReportActionsView |
| const MemoizedReportActionsView = React.memo(ReportActionsView, arePropsEqual); | ||
|
|
||
| export default compose(Performance.withRenderTrace({id: '<ReportActionsView> rendering'}), withWindowDimensions, withLocalize, withNetwork())(MemoizedReportActionsView); | ||
| export default compose(Performance.withRenderTrace({id: '<ReportActionsView> rendering'}), withNavigationFocus, withWindowDimensions, withLocalize, withNetwork())(MemoizedReportActionsView); |
There was a problem hiding this comment.
There's already useIsFocused hook.
|
@aimane-chnaif Thanks for pointing that out. I updated the PR |
|
please pull main |
| }, [props.report, didSubscribeToReportTypingEvents, reportID]); | ||
|
|
||
| useEffect(() => { | ||
| if (!isFocused && context.reactionListRef && context.reactionListRef.current) { |
There was a problem hiding this comment.
I don't quite understand this condition.
You meant if (isFocused || !context.reactionListRef || !context.reactionListRef.current)?
Also, make sure to re-test after your latest change.
There was a problem hiding this comment.
@aimane-chnaif sorry for the delay. I want to hide the emoji popover when we switch to other chat, that means the current chat will be hidden -> isFocused is false.
We also need to make sure context.reactionListRef.current is defined before calling hideReactionList
I also tested this and there's no regression. Pls let me know if it's unclear
There was a problem hiding this comment.
This is early return condition. It should be fully reversed
There was a problem hiding this comment.
ah sorry @aimane-chnaif, I faced with the lint error about early return, so I accidentally moved context.reactionListRef.current.hideReactionList(); outside if block. Will update soon.
|
@aimane-chnaif updated. Can you help review again? Thanks |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
|
@youssef-lr Can you help take a look at this? Thanks |
|
✋ 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/youssef-lr in version: 1.3.72-0 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.72-11 🚀
|
Details
Fixed Issues
$ #26178
PROPOSAL: #26178 (comment)
Tests
Offline tests
Same as above
QA Steps
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)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
Web
Screen.Recording.2023-09-12.at.22.46.51.mov
Mobile Web - Chrome
Screenrecorder-2023-09-12-22-52-51-947.mp4
Mobile Web - Safari
Screen.Recording.2023-09-12.at.22.53.30.mov
Desktop
Screen.Recording.2023-09-12.at.23.04.39.mov
iOS
Screen.Recording.2023-09-12.at.23.13.13.mov
Android
Screen.Recording.2023-09-12.at.23.13.13.mov