Hide mobile Search nav button + status tabs on scrollDown, but reveal on scrollUp#48258
Conversation
Guccio163
left a comment
There was a problem hiding this comment.
generally LGTM, works great! 👀
Kicu
left a comment
There was a problem hiding this comment.
Hey very nice work both on animation and refactoring. SearchPageHeader feels much simpler, and also Search component also looks simpler.
My only real problem is with SearchPageBottom because it became harder to read.
Most of my comments are minor naming issues, LGTM otherwise 👍
| isCustomQuery: boolean; | ||
| setOfflineModalOpen?: () => void; | ||
| setDownloadErrorModalOpen?: () => void; | ||
| data?: TransactionListItemType[] | ReportListItemType[]; |
There was a problem hiding this comment.
great job removing so many props! 👏
| hash={queryJSON.hash} | ||
| isCustomQuery={isCustomQuery} | ||
| /> | ||
| )} |
There was a problem hiding this comment.
Do you think its possible to somehow simplify this and reduce the amount of conditional rendering inside this return?
We have conditional rendering for TopBar + SearchTypeMenu, then extra condition for SearchStatusBar and all that is exclusive with SearchPageHeader rendering.
It's very hard to understand which parts of the UI will be rendered.
Some ideas:
- early returns?
- saving parts of JSX to variables?
- small helper components declared within this file?
I think you could try to go over this code again and see if anything can be improved.
|
@rayane-djouah 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] |
|
Running a test build for easier testing... |
This comment has been minimized.
This comment has been minimized.
|
Any idea how to fix the iOS build above so we can test? |
|
I merged main and the error should be solved(ruby-version file was missing, but it was reintroduced after merge). Can you try again? |
|
Will do! |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
|
I think this is feeling pretty darn good! |
|
We have conflicts also |
|
Waiting on @SzymczakJ to address the comments above |
|
I'll work on it today, I'm just prioritising #49457 |
|
@SzymczakJ yes, let's prioritize #49457 |
|
Bumped into bug on #49457, so no update for today |
|
fixed comments and conflicts @rayane-djouah |
|
kind bump @rayane-djouah 🙇 |
rayane-d
left a comment
There was a problem hiding this comment.
Looks good! One last comment
|
|
||
| return ( | ||
| <View style={[styles.pb4]}> | ||
| <View> |
There was a problem hiding this comment.
Last comment 😄 : To make this view consistent with the room members view, let's reduce the padding to 12px instead of removing it entirely. This way, we will have a total of 24px between the drop-down button and the 'Select All' checkbox.
| <View> | |
| <View style={[styles.pb3]} > |
| Room members | Search |
|---|---|
![]() |
![]() |
|
Done! |
rayane-d
left a comment
There was a problem hiding this comment.
Looks good to me and tests well. Thanks for the great work!
|
✋ 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.42-0 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.42-3 🚀
|
|
This PR caused the following issue: which was caused by wrapping |
| }, | ||
|
|
||
| searchListContentContainerStyles: { | ||
| marginTop: variables.searchListContentMarginTop, |
There was a problem hiding this comment.
We should use padding instead of margin for contentContainerStyle of ScrollView.
Related bug: #50649
Root cause: #50649 (comment)
| .filter( | ||
| (item) => | ||
| !SearchUtils.isTransactionListItemType(item) && | ||
| !SearchUtils.isReportActionListItemType(item) && | ||
| item.reportID && | ||
| item?.transactions?.every((transaction: {keyForList: string | number}) => selectedTransactions[transaction.keyForList]?.isSelected), | ||
| ) | ||
| .map((item) => item.reportID); |
There was a problem hiding this comment.
we did not cover for the case when item is TransactionListItemType, which cause this regression #57473,
RC in Proposal: #57473 (comment)


Details
This PR adds an animation that hides mobile Search nav bar on scroll down and reveals it on scrollUp. Please note that this feature is only meant to work on mobile screens. Also when user doesn't have enough expenses, the bar won't hide.
Fixed Issues
$ #48019
PROPOSAL:
Tests
Offline tests
QA Steps
Same as test steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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
animAndroid.mov
Android: mWeb Chrome
animAndroidweb.mov
iOS: Native
animIos.mov
iOS: mWeb Safari
iosweb.mov
MacOS: Chrome / Safari
MacOS: Desktop