-
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 cannot open search page by shortcut if delete receipt confirm modal is visible #33203
Conversation
…al visible Signed-off-by: Tsaqif <[email protected]>
@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] |
Signed-off-by: Tsaqif <[email protected]>
Bugs found while testing in staging and base master: In staging mweb, click on insert emoji button in `report action message edit` focus composer instead of displaying emoji picker:bug-insert-emoji-ineditmessageaction-d.mp4In my base master, double pressing ESC when user view attachment modal won't refocus composer:bug-double-esc-wont-focus-composer-d.mp4 |
@@ -96,6 +96,7 @@ function ThreeDotsMenu({iconTooltip, icon, iconFill, iconStyles, onIconPress, me | |||
hidePopoverMenu(); | |||
return; | |||
} | |||
buttonRef.current.blur(); |
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.
This is needed to prevent react native modal to show blue border box (because of focused state) of threedots button on modal hide when user close modal by pressing esc:
Video:
blue-border-d.mp4
This is because of trap focus of react native modal.
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 am not able to reproduce. Btw, if you reproduced, can you confirm also reproducible on staging/production?
If so, no need to fix here.
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.
@aimane-chnaif Because I am using onBackButtonPress={Modal.closeTop}
in BaseModal.tsx to fix an issue about: When user press three dots menu on attachment modal then press esc
the attachment modal is closed. The current behavior in staging:
Pressing esc on three dots menu in attachment modal:
esc-on-staging-d.mp4
After using onBackButtonPress={Modal.closeTop}
:
blue border appears:
blue-border-current-branch-d.mp4
@aimane-chnaif I am removing the isNavigating parameter. Should I preserve it instead? |
Are you sure that parameter isn't used anymore? |
@aimane-chnaif yes, I am sure it is not used anymore. |
@tsa321 please merge main |
@aimane-chnaif the branch is already up to date. |
? |
I am sorry @aimane-chnaif, done merging main. |
Please also fix author checklist. |
@aimane-chnaif author checklist fixed and main has been merged. |
@@ -96,6 +96,7 @@ function ThreeDotsMenu({iconTooltip, icon, iconFill, iconStyles, onIconPress, me | |||
hidePopoverMenu(); | |||
return; | |||
} | |||
buttonRef.current.blur(); |
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 am not able to reproduce. Btw, if you reproduced, can you confirm also reproducible on staging/production?
If so, no need to fix here.
src/libs/actions/Modal.ts
Outdated
/** | ||
* Close modal in other parts of the app | ||
*/ | ||
function close(onModalCloseCallback: () => void, isNavigating = true) { | ||
function close(onModalCloseCallback: () => void) { |
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.
isNavigating
is still needed.
As you see, composer is briefly focused
Screen.Recording.2024-01-21.at.8.13.56.PM.mov
this logic was added here
used in
App/src/components/EmojiPicker/EmojiPicker.js
Lines 85 to 88 in 52adf77
const hideEmojiPicker = (isNavigating) => { | |
if (isNavigating) { | |
onModalHide.current = () => {}; | |
} |
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.
@aimane-chnaif done preserving the isNavigating parameter
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.
There's no logic to reset isNavigate
after closeTop
Signed-off-by: Tsaqif <[email protected]>
@aimane-chnaif done adding a line to reset isNavigate value. The Reassure Performance Tests is failing, but I am not sure why it fails |
That seems caused by this PR. We should fix that |
Signed-off-by: Tsaqif <[email protected]>
@aimane-chnaif previously commit c2547ef without the reset isNavigate variable passes the performance test. |
can you revert all code to be same as main and see still fails? |
@tsa321 I confirmed tests are sometimes failing (on other PRs). Please merge main and see if fails again |
Signed-off-by: Tsaqif <[email protected]>
@aimane-chnaif , now the performance test is successful. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
Signed-off-by: Tsaqif <[email protected]>
✋ 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/jasperhuangg in version: 1.4.33-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.4.33-5 🚀
|
Details
Fixed Issues
$ #29511
PROPOSAL:#29511 (comment)
Tests
Offline tests
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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.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-msfari_d.mp4
MacOS: Chrome / Safari
macos-web_d.mp4
MacOS: Desktop
macos-desktop_d.mp4