fix/62703: comoser not focused after selecting emoji#64807
Conversation
|
@eVoloshchak 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] |
| * Hide the emoji picker menu. | ||
| */ | ||
| const hideEmojiPicker = (isNavigating?: boolean) => { | ||
| if (shouldUseNarrowLayout) { |
There was a problem hiding this comment.
Why do we need a shouldUseNarrowLayout check?
There was a problem hiding this comment.
I described in the issue that it is on mobile devices that a modal window is used that returns focus to the button when closed, so on a PC it makes no sense to defocus, since it does not affect this bug and, accordingly, it makes no sense to call an extra function that will affect the speed of code execution
There was a problem hiding this comment.
so on a PC it makes no sense to defocus,
I agree with this, however, we can make shouldUseNarrowLayout=true on Desktop too by resizing the window. It also works the other way, as shouldUseNarrowLayout can be false on a full-size iPad or an Android tablet. I believe it's better if we remove this check (but we gotta verify it works as expected on all the platforms)
There was a problem hiding this comment.
Does it matter which platform we use in this case?
We have the same logic on all platforms, that with shouldUseNarrowLayout=true a modal window of a different type is displayed, so you can also do resize on a PC and also catch this bug
This bug is precisely that the modal window is of a different type under this condition, I described it all in the issue, I will not repeat it here, if possible)
сс: @eVoloshchak
There was a problem hiding this comment.
2025-07-02.22.50.16.mov
Of course, I don't really understand what we are talking about, but if we use an iPad that has an extension of more than 800px, then a modal window of a different type will be rendered, and there will be no bug, because in my opinion it does not depend on the platform, but depends on the width of the screen and this bug is only with shouldUseNarrowLayout=true.
Perhaps I did not understand the question very well, so if the answer does not suit you, then please clarify it)
If you say that this function should be used for everything, then I can do it, but I don't really see the point
Ah, you're right.
True, but it is not caused by shouldUseNarrowLayout being true, it is caused by a specific behaviour of a modal we render when shouldUseNarrowLayout is true. But that may change in the future; we might use a different type of modal, we might use a different library for modals, etc, so it's not necessarily tied to
Yeah, I think we should use it everywhere. It is more future-proof and cleaner, as long as it works as expected on Desktop web/ Desktop MacOS |
|
Okay, i will remove this condition, PR will be updated by tomorrow morning, tomorrow morning you will be able to check |
|
PR is updated cc: @eVoloshchak |
@Eskalifer1, please fill out the Tests and QA Tests sections (they're going to be identical, but it's important both of them are populated, as QA only see the QA Tests section) |
|
My bad, didnt notice that. Already updated cc: @eVoloshchak |
|
@eVoloshchak Conflict is fixed, but we still get errors from test, as i can see this issues for that already created. So do we need ust to wait when they will be fixed? |
|
PR is updated cc: @eVoloshchak |
|
@eVoloshchak Updated PR, again) I would be grateful if it could be merged so that there would be no conflicts with the main one again) |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-07-07.at.13.00.30.movAndroid: mWeb ChromeScreen.Recording.2025-07-07.at.12.58.05.moviOS: HybridAppScreen.Recording.2025-07-07.at.13.01.07.moviOS: mWeb SafariScreen.Recording.2025-07-07.at.13.02.04.movMacOS: Chrome / SafariScreen.Recording.2025-07-07.at.13.03.00.movMacOS: DesktopScreen.Recording.2025-07-07.at.13.04.33.mov |
|
@Eskalifer1, the last step in all of the tests should be
|
eVoloshchak
left a comment
There was a problem hiding this comment.
LGTM!
The tests need to be changed (#64807 (comment))
|
Sorry, my bad. Steps section is updated |
|
✋ 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/marcaaron in version: 9.1.78-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.1.78-4 🚀
|
Explanation of Change
Fixed Issues
$#62703
PROPOSAL:#62703 (comment)
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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-app.mov
Android: mWeb Chrome
android-web.mov
iOS: Native
ios-app.mov
iOS: mWeb Safari
ios-web.mov
MacOS: Chrome / Safari
desktop.mov
MacOS: Desktop
desktop-mobile.mov
desktop-web.mp4