Fix report action context menu stuck when open search page with keyboard shortcut#29152
Fix report action context menu stuck when open search page with keyboard shortcut#29152cead22 merged 4 commits intoExpensify:mainfrom
Conversation
…ard shortcut Signed-off-by: Tsaqif <tsaiinkwa@yahoo.com>
|
@mollfpr Could you review my pr when you have a chance? thank you... |
|
@mollfpr Friendly bump... |
| } | ||
|
|
||
| activePopoverRef.current.close(); | ||
| lodashGet(activePopoverRef, 'current.onCloseCallback', () => {})(); |
There was a problem hiding this comment.
I understand you want to call the function after it returns from the lodashGet, but I found this harder to understand at first glance. Usually, people use lodashGet to assign the return to another variable instead of calling it immediately, so this will make us for a moment. Could we make it more explanatory instead of making it simple?
There was a problem hiding this comment.
@mollfpr just to make sure for the easy to read code. Should we change the code into something like this?:
const closeCallback = lodashGet(activePopoverRef, 'current.onCloseCallback', () => {})
closeCallback();Or should we use if clause instead? something like this:
if (activePopoverRef && activePopoverRef.current && activePopoverRef.current.onCloseCallback) {
activePopoverRef.current.onCloseCallback();
}Or do you have other options?
There was a problem hiding this comment.
The if clause looks good to me!
| closePopover(activePopoverRef.current.anchorRef); | ||
| } | ||
| activePopoverRef.current = popoverParams; | ||
| lodashGet(activePopoverRef, 'current.onOpenCallback', () => {})(); |
Signed-off-by: Tsaqif <tsaiinkwa@yahoo.com>
|
IF this issue is related to same root cause as #29341. Please hold this PR. |
|
@parasharrajat This is different root cause with #29341 What I am saying is my PR could also solve #28241 (the attachment refresh navigation issue, I have tested it by reverting the PR that solve the issue and executing my PR) So I found a solution for my issue that I am trying to solve here and the other issue #28241 (the attachment navigation issue) Can we move forward? |
|
@mollfpr Could we move forward? It is different root cause... |
|
cc @mollfpr: parasharrajat replies from other issue: #28241 (comment) |
|
@tsa321 Let's wait for the revert, and we can move forward with this. |
|
@tsa321 Could you add |
|
@mollfpr The revert has been merged, let's continue this PR. Thank you... |
Signed-off-by: Tsaqif <tsaiinkwa@yahoo.com>
Reviewer Checklist
Screenshots/VideosWeb29152.Web.mp4Mobile Web - Chrome29152.mWeb-Chrome.mp4Mobile Web - Safari29152.mWeb-Safari.mp4Desktop29152.Desktop.mp4iOS29152.iOS.mp4Android29152.Android.mp4 |
| } | ||
|
|
||
| activePopoverRef.current.close(); | ||
| if (activePopoverRef && activePopoverRef.current && activePopoverRef.current.onCloseCallback) { |
There was a problem hiding this comment.
I don't think we need activePopoverRef && activePopoverRef.current && since above we're calling activePopoverRef.current.close();
| if (activePopoverRef && activePopoverRef.current && activePopoverRef.current.onCloseCallback) { | |
| if (activePopoverRef.current.onCloseCallback) { |
Signed-off-by: Tsaqif <tsaiinkwa@yahoo.com>
cead22
left a comment
There was a problem hiding this comment.
Thanks for testing several different popup conbinations!
|
✋ 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/cead22 in version: 1.3.88-0 🚀
|
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.88-11 🚀
|
Details
Fixed Issues
$ #27244
PROPOSAL: #27244 (comment)
Tests
For Macos chrome / Desktop:
kkkkkFor mobile:
Offline tests
QA Steps
For Macos chrome / Desktop:
kkkkkFor mobile:
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
Android: Native
android-native_d.mp4
Android: mWeb Chrome
android-mweb_d.mp4
iOS: Native
ios-native_d.mp4
iOS: mWeb Safari
ios-msafari_d.mp4
MacOS: Chrome / Safari
macos-web_d.mp4
MacOS: Desktop
macos-dekstop_d.mp4