-
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
Hide mobile Search nav button + status tabs on scrollDown, but reveal on scrollUp #48258
Hide mobile Search nav button + status tabs on scrollDown, but reveal on scrollUp #48258
Conversation
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.
generally LGTM, works great! 👀
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great job removing so many props! 👏
hash={queryJSON.hash} | ||
isCustomQuery={isCustomQuery} | ||
/> | ||
)} |
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.
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! |
Cool, so it seems like the current behavior is expected. @rayane-djouah let's continue with the review. |
@SzymczakJ Let's address my requested changes above |
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 🙇 |
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.
Looks good! One last comment
@@ -45,7 +45,7 @@ function SearchSelectedNarrow({options, itemsLength}: SearchSelectedNarrowProps) | |||
}; | |||
|
|||
return ( | |||
<View style={[styles.pb4]}> | |||
<View> |
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.
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! |
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.
Looks good to me and tests well. Thanks for the great work!
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use padding instead of margin for contentContainerStyle of ScrollView.
Related bug: #50649
Root cause: #50649 (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 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
animAndroid.mov
Android: mWeb Chrome
animAndroidweb.mov
iOS: Native
animIos.mov
iOS: mWeb Safari
iosweb.mov
MacOS: Chrome / Safari
MacOS: Desktop