Open SzymczakJ opened 2 weeks ago
@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]
Ready for review @rayane-djouah I would also like to hear opinion from design team and @luacmartins π
https://github.com/user-attachments/assets/60e6b5d0-41ba-4071-94fb-2eb042e340d7
I'll spin up a test build!
Kicked off the build https://github.com/Expensify/App/actions/runs/12934975324
π§ @luacmartins has triggered a test build. You can view the workflow run here.
@SzymczakJ can you merge main? We have conflicts, but more importantly we fixed some Search bugs that should be reflected on this branch too
This is looking really good though!
@rayane-djouah this would be a good PR to prioritize next too π
:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! :test_tube::test_tube: | Android :robot: | iOS :apple: |
---|---|---|
https://ad-hoc-expensify-cash.s3.amazonaws.com/android/55078/index.html | https://ad-hoc-expensify-cash.s3.amazonaws.com/ios/55078/index.html | |
Desktop :computer: | Web :spider_web: | |
https://ad-hoc-expensify-cash.s3.amazonaws.com/desktop/55078/NewExpensify.dmg | https://55078.pr-testing.expensify.com | |
:eyes: View the workflow run that generated this build :eyes:
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and not onIconClick
).src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components using Avatar
have been tested & I retested again)/** comment above it */
this
properly so there are no scoping issues (i.e. for onClick={this.submit}
the method this.submit
should be bound to this
in the constructor)this
are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this);
if this.submit
is never passed to a component event handler like onClick
)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG
)Avatar
is modified, I verified that Avatar
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 the Test
steps.The router feels kinda excessively tall when you open it on desktop:
Can we reduce the height? Curious if @Expensify/design agrees. Maybe like 2/3 of the overall viewport height or something? Or even a fixed amount that feels reasonable.
When I type "test" and hit enter, I don't get any results... why doesn't it actually search my query?
https://github.com/user-attachments/assets/b756570f-9ffc-4795-b236-95e5d41914c0
Also notice the really weird jump that forces a quick scrollbar on the LHN. We need to fix that too:
When I click on the Chats tab in the LHN, shouldn't the router by populated with type:chats
?
Same for all of the others.
On mobile, the transition with the input and Cancel link feels slightly sluggish? Like it feels like it's just slightly after my clicking...
https://github.com/user-attachments/assets/8139cdf7-1f7b-4c94-8d58-7e46acfa1ae4
On the search input, the placeholder color is too light:
It should be our textSupporting color, which is #76847E
This: https://github.com/Expensify/App/pull/55078#issuecomment-2612136303
https://github.com/Expensify/App/pull/55078#issuecomment-2612136303
Is a regression that I found a few days ago and mentioned it here: https://github.com/Expensify/App/pull/54807#issuecomment-2587516329
Forgot to follow up. We can either ask the person responsible for PR to fix, or maybe @SzymczakJ can try to fix inside this PR to speed things up. However fixing outside of PR would also make sense, as this bug was not introduced by Jakub's refactor.
Regarding @Kicu comment, I'm fine with fixing this behaviour in this PR(this seems an easy bug), so the whole SearchPage tests well
Regarding @shawnborton comment:
When I click on the Chats tab in the LHN, shouldn't the router by populated with type:chats?
Right now, I'm not showing the query in TextInput in case when it's one of the "canned queries", this might have been overlooked in the designs but they also point to the same bahaviour. What do you think about such aproach?
Thanks for the detailed review Shawn! You mentioned all the things I noticed and moreβI agree with all your comments.
What do you think about such aproach?
I think it makes sense to populate the canned searches with the appropriate filter. I could see not populating anything for expenses though since that's the default that we use.
Is a regression that I found a few days ago and mentioned it here: https://github.com/Expensify/App/pull/54807#issuecomment-2587516329
I believe this regression was fixed here. It's also already fixed on this branch after the latest merge with main.
I could see not populating anything for expenses though since that's the default that we use.
I'd vote that we either do it for all of the canned searches or none of them. IMO I like the current approach the most since the user interacts with the LHN and not the Search bar in those scenarios, so seeing the Search bar update feels a bit odd to me. That being said, I do find it odd that when I have Chats
selected and search for something, it brings me back to Expenses
https://github.com/user-attachments/assets/cc90a772-d36c-4fe8-aba3-e5c3c23eef3c
Hmm but the LHN items are literally just shortcuts to existing search queries, and thus I think we should populate the query bar with them.
The argument for not putting it on Expenses is basically like how Gmail handles the Inbox. When you are on the Inbox in Gmail, no query is needed - it's the default set of results. However, if you go to Sent or Drafts, the query bar is updated.
Hmm but the LHN items are literally just shortcuts to existing search queries, and thus I think we should populate the query bar with them. The argument for not putting it on Expenses is basically like how Gmail handles the Inbox. When you are on the Inbox in Gmail, no query is needed - it's the default set of results. However, if you go to Sent or Drafts, the query bar is updated.
Yeah I feel the same. I think updating the query bar reinforces and very subtly educates the user how the product works.
I'm cool with that too, not super passionate. So to align on this we'd:
Is that right?
I'm reassigning C+ since @rayane-djouah will have limited availability next week.
@luacmartins I can finish this one today but first, is this ready for review right now (no more changes) or are we waiting on some changes based on recent discussion with design team summarized in https://github.com/Expensify/App/pull/55078#issuecomment-2613193620 ?
I think we still have the changes below:
Cool, then @SzymczakJ please let me know when the PR is ready for review! π
Explanation of Change
This PR is mainly about redesigning Search Page but I also made a pretty big refactor and improved performance of Search Page mobile header animation. These are the design changes:
on mobile SearchPage, we remove the button that navigates to SearchRouter
instead of that we put SearchRouterInput in place where SearchTypeMenuNarrow was, focusing this input is making SearchRouterList visible.
on mobile SearchPage user can still open type menu modal by pressing the button next to SearchRouterInput
These are refactor changes:
SearchPageBottomTab.tsx
so that it has one render for narrow screen and one render for full screen, for better readability.SearchTypeMenuNarrow.tsx
and decuple it's logic fromSearchTypeMenu.tsx
, now this logic lives inSearchTypeMenuPopover.tsx
with the common parts ofSearchTypeMenuPopover
andSearchTypeMenu
put intoSearchUIUtils
.SearchSelectionModeHeader.tsx
as it added unnecessary layer that was confusing.Fixed Issues
$ https://github.com/Expensify/App/issues/52317 PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop