-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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: 25448 ESC keyboard shortcut shows up in modal on second render on login page #26809
Fix: 25448 ESC keyboard shortcut shows up in modal on second render on login page #26809
Conversation
@Charan-hs Add the test step, please. |
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.
Mostly looks good, just couple of comment.
@@ -138,7 +139,7 @@ function KeyboardShortcutsModal({isShortcutsModalOpen = false, isSmallScreenWidt | |||
}; | |||
// We only want this to run on mount | |||
// eslint-disable-next-line react-hooks/exhaustive-deps | |||
}, []); | |||
}, [KeyboardShortcut.getDocumentedShortcuts]); |
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.
Are we still depending on KeyboardShortcut.getDocumentedShortcuts
? The comment says that this useEffect
only runs on mount.
@@ -149,7 +150,7 @@ function KeyboardShortcutsModal({isShortcutsModalOpen = false, isSmallScreenWidt | |||
} | |||
// subscribeOpenModalShortcuts and unsubscribeOpenModalShortcuts functions are not added as dependencies since they don't change between renders | |||
// eslint-disable-next-line react-hooks/exhaustive-deps | |||
}, [isShortcutsModalOpen]); | |||
}, [isShortcutsModalOpen, KeyboardShortcut.getDocumentedShortcuts]); |
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, what is the reason for adding the dependency?
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.
removing those deps
Reviewer Checklist
Screenshots/VideosWeb26809.Web.movMobile Web - Chrome26809.mWeb.Chrome.mp4Mobile Web - Safari26809.mWeb.Safari.mp4Desktop26809.Desktop.moviOS26809.iOS.mp4Android26809.Android.mp4 |
@Charan-hs I see that you commented on #26829, Will the issue be fixed in this PR? I tried the steps in this PR, but the issue is still reproduced. Logically, that issue will be fixed with your solution. Could you check? Thanks! |
Yes we can fix this #26829 issue but here #25448 (comment) it mentioned to mark it as a separate bug, If you want I can fix issue with same PR |
@Charan-hs I see your suggestion for fixing the unsubscribe here. Is that all you need to fix #26829, and this PR is also part of the fix? If yes, we should keep it separate so the original issue won't be out of scope and it easier to track the issue. |
Thanks @Charan-hs Since #26829 it's already put external, we should fix the issue there. Feel free to post the proposal there, or you could ask them to wait for this PR to be merged to get a better result. |
My proposal already posted here #26829 (comment) |
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 👍
refresh the page
@Charan-hs Could you add a note here for the test on native platforms?
Like refresh the page (for iOS and Android you need to close and reopen the app)?
Merge freeze ends on Monday. I'll merge then |
Hi @Charan-hs, the freeze season is past! Before we get this merge, could we pull the latest main and retest the PR? Thanks! |
Hi @mollfpr, I was wondering if you could let me know why this hasn't been merged yet? I would really appreciate it. |
@arosiclair I tested it again with the latest commit, which still tests well. We can get this merged. Sorry @Charan-hs, I can't merge any PR. Only the internal engineer can do it. |
✋ 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/arosiclair in version: 1.3.69-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.69-2 🚀
|
🚀 Deployed to staging by https://github.com/arosiclair in version: 1.3.70-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.70-8 🚀
|
Details
Fixed Issues
$ #25448
PROPOSAL: #25448 (comment)
Tests
Offline tests
Same as above
QA Steps
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
Web
keyboard.shortcut.modal.fix.mp4
Mobile Web - Chrome
WhatsApp.Video.2023-09-08.at.12.00.10.PM.mp4
Mobile Web - Safari
Screen.Recording.2023-09-08.at.11.46.06.AM.mov
Desktop
keyboard.desktop.mp4
iOS
Screen.Recording.2023-09-08.at.11.47.19.AM.mov
Android
WhatsApp.Video.2023-09-08.at.1.26.18.PM.mp4