-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix report action context menu stuck when open search page with keyboard shortcut #29152
Conversation
…ard shortcut Signed-off-by: Tsaqif <[email protected]>
@mollfpr Could you review my pr when you have a chance? thank you... |
@mollfpr Friendly bump... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review @tsa321, I just got out from the hospital after surgery on my right because of the motorcycle accident on Wednesday 🙏
I left a comment but the test looks good.
activePopoverRef.current.close(); | ||
lodashGet(activePopoverRef, 'current.onCloseCallback', () => {})(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The if clause looks good to me!
@@ -106,6 +109,7 @@ function PopoverContextProvider(props) { | |||
closePopover(activePopoverRef.current.anchorRef); | |||
} | |||
activePopoverRef.current = popoverParams; | |||
lodashGet(activePopoverRef, 'current.onOpenCallback', () => {})(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as the above.
Signed-off-by: Tsaqif <[email protected]>
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 <[email protected]>
Reviewer Checklist
Screenshots/VideosWeb29152.Web.mp4Mobile Web - Chrome29152.mWeb-Chrome.mp4Mobile Web - Safari29152.mWeb-Safari.mp4Desktop29152.Desktop.mp4iOS29152.iOS.mp4Android29152.Android.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and tests well 👍
All yours @cead22
activePopoverRef.current.close(); | ||
if (activePopoverRef && activePopoverRef.current && activePopoverRef.current.onCloseCallback) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cead22 done
Signed-off-by: Tsaqif <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:
k
k
k
k
k
For mobile:
Offline tests
QA Steps
For Macos chrome / Desktop:
k
k
k
k
k
For mobile:
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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