-
Notifications
You must be signed in to change notification settings - Fork 3k
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: Composer does not refocus on clicking the same chat in LHN #21552
Fix: Composer does not refocus on clicking the same chat in LHN #21552
Conversation
@Santhosh-Sellavel 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] |
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!
@@ -148,6 +148,14 @@ function OptionRowLHN(props) { | |||
|
|||
props.onSelectRow(optionItem, popoverAnchor); | |||
}} | |||
// Prevent losing Composer focus |
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.
Let's take this comment inside and above preventDefault()
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.
Let's make sure to test it does not add regression if focus is on other element than composer. cc @Santhosh-Sellavel
@tienifr Avoid creating PRs before you are assigned to the issue. This would lead to unnecessary confusion and it's against guidelines. Please update the recordings after merging the latest main |
@Santhosh-Sellavel I've updated the screenshots accordingly. Also tested on a small screen to avoid #20797 regression. Screencast.from.11-07-2023.00.28.03.webm |
Switching to other chats the focus is lost on composer, Can you please check @tienifr ? Screen.Recording.2023-07-11.at.4.02.18.AM.mov |
It's working fine on my side 😕 Screencast.from.11-07-2023.14.01.08.webm |
Maybe that's because in your video, there was another Expensify tab where a modal was already open, which made this check fail:
Do you think we should fix this? |
@tienifr Try merging with the main |
So this PR becomes stale if that's the new expectation |
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Sorry, I'm a little bit messed up with the newly-configured git. I've merged the latest |
9515da1
to
37520c4
Compare
@Santhosh-Sellavel So what are the next steps regarding #21552 (comment) ? |
@tienifr Did you find where(PR or issue) that change was made? |
@Santhosh-Sellavel This is the root PR: #1699. The purpose of the change was:
Also, the issue exists before this PR. We should create a separate issue in case we want to fix it. |
I've tested on both staging and the latest Screen.Recording.2023-07-14.at.01.18.38.movScreen.Recording.2023-07-14.at.01.22.17.mov |
Sorry as you can see it was not working for me here. It was confusing for me as well. It's working now, will try testing again with your changes and let you know! |
Reviewer Checklist
Screenshots/VideosWeb & DesktopScreen.Recording.2023-07-14.at.6.49.30.PM.movMobile AllScreen.Recording.2023-07-14.at.7.01.05.PM.mov |
@tienifr The test steps don't work as expected for mobile native/web. That's irrelevant here so better update the test steps to test only focus issue on Desktop App & Desktop Web only. |
@tienifr bump! |
@Santhosh-Sellavel Thanks for bumping me. Agree with you that we should only test on Desktop App & Desktop Web only. I just updated the steps. Can you please check again? |
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.
@MonilBhavsar Looks good to me All yours thanks!
🚀 Deployed to staging by https://github.com/MonilBhavsar in version: 1.3.42-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.42-26 🚀
|
} | ||
|
||
// Prevent losing Composer focus | ||
e.preventDefault(); |
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.
Details
Composer does not refocus on clicking the same chat in LHN.
Fixed Issues
$ #20865
PROPOSAL: #20865 (comment)
Tests
Offline tests
NA
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
Screencast.from.11-07-2023.00.23.22.webm
Mobile Web - Chrome
video_2023-07-10_08-17-35.mp4
Mobile Web - Safari
original-AEC2EF59-A73F-4B88-957E-D0C50281B4C5.mp4
Desktop
250957331-188dad0d-91c8-4dd5-bd41-cad5196339dc.mov
iOS
250957312-31d65fc5-9301-445f-b246-dbec92307d2d.mov
Android
Screencast.from.10-07-2023.08.45.35.webm