Fix Pronouns loses focus on coming back from new group page or search page#27147
Fix Pronouns loses focus on coming back from new group page or search page#27147hoangzinh wants to merge 5 commits into
Conversation
| import Log from '../../libs/Log'; | ||
| import OptionsListSkeletonView from '../OptionsListSkeletonView'; | ||
| import useActiveElement from '../../hooks/useActiveElement'; | ||
| import withNavigationFocus from '../withNavigationFocus'; |
There was a problem hiding this comment.
Perhaps it might be better to use the useIsFocused() hook instead of withNavigationFocus as this is a functional component.
There was a problem hiding this comment.
That's fair call. I just updated the PR to use hook instead of HOC
| import Log from '../../libs/Log'; | ||
| import OptionsListSkeletonView from '../OptionsListSkeletonView'; | ||
| import useActiveElement from '../../hooks/useActiveElement'; | ||
| import withNavigationFallback from '../withNavigationFallback'; |
There was a problem hiding this comment.
Why is the use of withNavigationFallback necessary here?
There was a problem hiding this comment.
This PR had perf-tests failed previously https://github.com/Expensify/App/actions/runs/6147658200/job/16679631094?pr=27147
After searching through the codebase, I found that in the Button component, we also use this fallback
App/src/components/Button/index.js
Lines 326 to 327 in bfc6468
After I tried to apply the fallback HOC, it passed the perf-tests
There was a problem hiding this comment.
Ahh I guess because the perf-tests don't wrap it in a NavigationContainer. Any thoughts on this @tgolen?
There was a problem hiding this comment.
I don't have any general knowledge of either of those, so I don't have any thoughts, no. Do you have any questions specifically?
There was a problem hiding this comment.
Ah ok no problem. Well the alternative to utilizing the fallback would be perhaps to modify the perf-tests themselves but that seems a little out of scope here so utilizing the navigation fallback is fine, in my opinion.
|
I think this may have just been fixed by #26415, @hoangzinh Can you confirm? |
You're right. It has been fixed by that PR |
|
Can this be closed then? |
|
Yeah this can be closed. |
Details
Fixed Issues
$ #26350
PROPOSAL: #26350 (comment)
Tests
On Web/Desktop
Offline tests
Changes are not affected by network status
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
Web
Screen.Recording.2023-09-11.at.20.45.30.-.web.mov
Mobile Web - Chrome
Screen.Recording.2023-09-11.at.22.43.53.-.android.chrome.mov
Mobile Web - Safari
Screen.Recording.2023-09-11.at.22.45.12.-.ios.safari.mov
Desktop
Screen.Recording.2023-09-11.at.22.47.36.-.desktop.mov
iOS
Screen.Recording.2023-09-11.at.22.46.11.-.ios.mov
Android
Screen.Recording.2023-09-11.at.22.43.05.-.android.mov