Repository navigation
Conversation
|
@hoangzinh 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] |
|
@jnowakow just wanna confirm if this PR is still in draft, isn't it? |
|
Yeah, I want to check one more thing but I'm currently working on other issue :/ |
|
Thanks for confirmation @jnowakow |
|
@hoangzinh it's ready now. I fixed one more case. |
|
Thank you @jnowakow. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
| } | ||
| }} | ||
| ref={textInputRef} | ||
| autoFocus={prevDraftMessage === undefined || draftMessage !== undefined} |
There was a problem hiding this comment.
Based on previous logic in PureReportActionItem, it should be:
| autoFocus={prevDraftMessage === undefined || draftMessage !== undefined} | |
| autoFocus={prevDraftMessage === undefined && draftMessage !== undefined} |
wdyt?
There was a problem hiding this comment.
Btw, the new approach looks good to me. But I'm unsure if it causes any regression, because previous logic (with useEffect) it's focused whenever the prevDraftMessage === undefined && draftMessage !== undefined is satisfied.
There was a problem hiding this comment.
Good catch! I'll take a look at it
There was a problem hiding this comment.
Okey, those changes don't work anymore since this PR was merged. I'll try to find another solution but I it seems there's a bug in RN
There was a problem hiding this comment.
I got it. Please keep us updated on how you're finding
|
@jnowakow we can close this PR |
|
I'm not going to work on this PR in closest future so I'm closing it |
Explanation of Change
This PR removes temporary fix for #56311 and provides valid one. The logic of
PureReportActionItemand its child components is quite complicated but it occurs thatfocusInputWithDelayin this particular situation can be replace with simpleautofocusone level down the tree.With
focusInputWithDelaybeing called inuseEffectwe were in situation when in one render input component was created and focus onrefto it was called. Because of optimisations made by react native request to show keyboard was send to system before actual input was shown on the screen and thus was ignored.Fixed Issues
$ #56311
PROPOSAL: N/A
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 stepssectiontoggleReportand 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 (Hybrid)
Android.mov
Android: mWeb Chrome
iOS: Native (Hybrid)
ios.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
web.mov
MacOS: Desktop