-
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
Don't focus when ref composer is unmounted #25981
Conversation
@ 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] |
PR ready for review |
LGTM |
Lint is failing? |
thanks, fixed! |
@rushatgabhane Just an idea, so there are two places where |
Reviewer Checklist
Screenshots/VideosWebweb25981.mp4Mobile Web - ChromeN/A Mobile Web - Safari25981safari.mp4Desktop25981desktop.mp4iOSios25981.mp4AndroidN/A |
Nice call! What do you think of using optional chaining everywhere? There's more places where |
Optional chaining is not allowed. RIP |
This reverts commit 8433620.
Yeah not until Typescript, can you revert that change 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.
Thanks @rushatgabhane ❤️
@mountiny could you please retest web once. |
@@ -403,7 +410,7 @@ function ReportActionCompose({ | |||
{DeviceCapabilities.canUseTouchScreen() && isMediumScreenWidth ? null : ( | |||
<EmojiPickerButton | |||
isDisabled={isBlockedFromConcierge || disabled} | |||
onModalHide={() => composerRef.current.focus(true)} | |||
onModalHide={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.
@mountiny this might be a noob question, but are these both equivalent?
onModalHide={focus}
onModalHide={() => 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.
I believe they are equivalent. The first option is passing the function directly as a reference so in theory its slightly more efficient because the second option everytime creates a new inline function that calls the focus function
@rushatgabhane lint |
@mountiny fixed :) |
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!
@mountiny I reported this issue. Can you please add my name as a reporter. Thanks. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
@Natnael-Guchima we havent created issues for these, can you please take note and I will create one issue with all the valid follow ups found and fixed once this is done and dusted? |
Sure! I will list all the follow-ups I reported and I will let you know once this is all done and pushed to prod. |
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.58-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.58-5 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.59-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.59-5 🚀
|
Details
Fixed a regression caused by #25758.
cc: @mountiny @mountiny
Fixed Issues
$ https://expensify.slack.com/archives/C049HHMV9SM/p1692991483808169
PROPOSAL: https://expensify.slack.com/archives/C049HHMV9SM/p1692997508379109?thread_ts=1692991483.808169&cid=C049HHMV9SM
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)/** 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
Screen.Recording.2023-08-26.at.14.39.35.mov
Mobile Web - Chrome
screen-20230828-021327-2023-08-27.20_45_09.248.mp4
Mobile Web - Safari
Screen.Recording.2023-08-28.at.02.11.45.mov
Desktop
Screen.Recording.2023-08-28.at.02.20.50.mov
iOS
Screen.Recording.2023-08-28.at.02.02.49.mov
Android
screen-20230828-031153-2023-08-27.21_43_11.290.mp4