-
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
Fix bottom tab highlight delay #44931
Fix bottom tab highlight delay #44931
Conversation
@ikevin127 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] |
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
recheck |
@Zakpak0 Take your time, go through the checklist and once you checked all the boxes and added videos testing the fix (given the Tests steps) for all platforms, proving that the PR fixes the issue -> then I will be able to start working on the reviewer checklist and move this PR a step closer to merge. Note: For checkboxes where the PR code changes don't reach, simply check them off without any actions. Example of checkbox given your PR: You might also have a few conflicts during this PR which is preferred that you always solve in order to allow me to start working on the checklist. |
@ikevin127 Thanks for the advice! |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb Chrome *android-mweb.webmiOS: NativeiOS: mWeb Safari *ios-mweb.mp4MacOS: Chrome / Safari *web.movMacOS: Desktop *desktop.mov |
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.
LGTM and tests well 🚀
@luacmartins Can you please double check the code to make sure it aligns with our style guide ? Nothing jumps out for me, but since I'm not a very experienced code reviewer - I usually rely on CME to do a final review of the code.
We have conflicts. @adamgrzybowski would you mind reviewing this PR? |
@Zakpak0 Can you please sync with main and solve the conflicts when you get a chance ? Additionally, please edit the PRs title to better reflect the issue that this is fixing since |
Hi @ikevin127 I renamed the pull request to "Fix bottom tab highlight delay" following the style of one of @luacmartins PRs. |
@Zakpak0 Thanks! We're awaiting a final review from @adamgrzybowski to sign-off on the code changes after which, if no changes are required / conflicts arise, the PR should get merged. |
@WojtekBoman as you may have more context on the topic of |
Note Some context from proposal review regarding |
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.
TS check is failing. Changes LGTM, but I'll let @WojtekBoman review this as well, since he has more context on this navigation logic.
@Zakpak0 To fix the TS issues, you can run Tip: If you move code around, it's good practice to run |
@luacmartins Fixed the type issues if (isLoadingItems) {
return (
<>
<SearchPageHeader
query={query}
hash={hash}
/>
<SearchRowSkeleton shouldAnimate />
</>
);
}
const shouldShowEmptyState = searchResults && SearchUtils.isSearchResultsEmpty(searchResults);
if (shouldShowEmptyState || !searchResults) {
return (
<>
<SearchPageHeader
query={query}
hash={hash}
/>
<EmptySearchView />
</>
);
} @ikevin127 Thanks, formatted the code and run the tscheck! |
@ikevin127 could you please review again given the recent changes? cc @WojtekBoman as well since you're familiar with this code |
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.
@Zakpak0 code LGTM. We have conflicts again.
@luacmartins got it. |
✋ 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/luacmartins in version: 9.0.7-3 🚀
|
🚀 Cherry-picked to staging by https://github.com/thienlnam in version: 9.0.7-4 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
type SearchNavigatorParamList = { | ||
[SCREENS.SEARCH.BOTTOM_TAB]: undefined; | ||
[SCREENS.SEARCH.CENTRAL_PANE]: undefined; | ||
[SCREENS.SEARCH.REPORT_RHP]: undefined; | ||
}; | ||
|
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.
Hey @Zakpak0, I am working on some navigation changes and I noticed these new types. Could you please explain to me why this type is necessary? I don't see any navigator named SearchNavigator
.
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.
Np @adamgrzybowski , happy to.
If I recall correctly, I was having a hard time finding an existing type that defined the search tab's routes in isolation.
I created that to supplement the creation of this type here.
Maybe a better name for it would be SearchTabRoutes.
This is my first time touching the code base and I was attempting to follow the patterns I saw.
Even if I was being a bit naive.
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 am working on some navigation changes
Please feel free to mini-refactor if you're working on this at the moment and you see fit, as long as this PRs changes won't throw type errors I think you're good to go!
🚀 Deployed to production by https://github.com/thienlnam in version: 9.0.7-8 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.8-6 🚀
|
Details
Modified the useActiveRoute hook to return a match for all bottom tab routes.
Renamed it useActiveBottomTabRoute
Modified files to use this hook instead of previous logic when information on the currently selected bottom tab is needed.
Fixed Issues
$ #44587
PROPOSAL:#44587 (comment)
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 methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
Android: Native
Android.44587.mov
Android: mWeb Chrome
webMAndroid.mov
iOS: Native
iPhone.44587.mov
iOS: mWeb Safari
webMIos.mov
MacOS: Chrome / Safari
Web.44587.mov
MacOS: Desktop
Desktop.44587.mov