-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[Search v1] Add sorting #42248
[Search v1] Add sorting #42248
Conversation
b07ba13
to
0dea1c3
Compare
8c435c6
to
fe5cd89
Compare
fe5cd89
to
62dc109
Compare
@luacmartins This is my first approach to this: https://github.com/Expensify/App/pull/42248/files#diff-4e6d1f540181229a6bc7bd2f96266c9b76bc05cf86150ea1e225c657d358aafbR54 However there are 2 problems with this approach:
Examples:
Currently I see no other reasonable solution than a chain of Do you see any other solution and what way do you want me to move forward? Feel free to check the draft PR - everything else should be working |
@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] |
8750a91
to
6e379da
Compare
@shawnborton in here is the fix for #42269 I added this to "test steps" for the reviewer. |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
I don't have any more visual bugs to report (cc @Expensify/design in case you run into anything though), but one thing I did notice was that it doesn't feel like the sorting behavior is actually correct. For instance, if I sort by amount - descending, it seems to be okay but then as I scroll down the list, I see some larger amounts start to appear and it feels like the sorting almost starts over again. Any ideas what's going on there? |
Agree!
I actually think you should be able to sort by action and type. For example, I might want to sort by action so that all the expenses with a "Pay" button show in a group. Same with type. I don't see why we wouldn't let you sort by those two.
Same here. I'm noticing this with most of the sortable fields, not just Total. |
Yeah actually that's a totally valid point, I agree with you! |
Guys, I will not be merging and solving conflicts on this yet, as this PR: #42410 also introduces big changes to Meanwhile we can still investigate if sorting logic works correctly |
Yea, this is fine. Not all transactions will have a merchant (that's not the default ones, which we don't want to show).
I also think this is fine for now. We can filter this out later if we decide to.
The I'm not sure what the issue with total is. @c3024 what data are you getting for those transactions that are not sorted properly? Also, I'd say we don't block on this and address this in a follow up, since it seems like an edge case. |
I cannot repro it today. I didn't see what the transaction data was yesterday.
Agreed. Code changes look good. Will test again after the conflicts are fixed and will complete the checklist. |
@Kicu I merged the |
There is a require cycle with PR #42410
Nothing broken but we might consider fixing that as well here. |
6f5946b
to
2fd1c57
Compare
@luacmartins @c3024 The biggest changes are:
@luacmartins for now the
Please review :) |
Thanks @Kicu! Not sure if we wanna sort by receipts or not, but we can definitely go ahead without sorting that for now. As for reports, we landed on no sorting for now, so all good there. |
LGTM this is still a thing that we should address in a follow up |
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
@c3024 can you review again please? |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariaddSort.mp4MacOS: DesktopaddSortDesktop.mp4 |
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!
There are cases of |
✋ 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: 1.4.77-11 🚀
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.4.77-11 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.78-5 🚀
|
Details
formatted**
fields are so that we are guaranteed that the values we sort by are the same as values that are actually displayed for the user, so I compute them in thegetSections
function; date needs a bit of special handling because we need different date representation for sorting and different for displayFixed Issues
$ #39892
$ #42269
PROPOSAL:
Tests
Settings > Troubleshoot > New Search Page
(NOTE: right now search works only on staging api) or go to[...]/search/all
URLOffline 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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
rec-web-sorting-v2.mp4
MacOS: Desktop