[Search v1] Add small followups for sorting in search#42980
[Search v1] Add small followups for sorting in search#42980luacmartins merged 6 commits intoExpensify:mainfrom
Conversation
src/CONST.ts
Outdated
|
|
||
| SEARCH_DATA_TYPES: { | ||
| TRANSACTION: 'transaction', | ||
| TRANSACTION: 'transactions', |
There was a problem hiding this comment.
Will this be proper name or will we revert back to singular? @luacmartins
There was a problem hiding this comment.
Yes, the correct value is transaction
|
@luacmartins In general the issue of getting new records with bigger/longer values is inevitable. This will happen both when changing sort (as we put sorting params inside So they might pop-in and pop-out based on records. I believe that was your (?) decision to code them like this? We can always change that. As for showing a loader: when doing this issue I decided the UX was bad with constant loading flicker and so I added keeping track of previous results which made the table feel more smooth. rec-web-sortingloader.mp4You will get the flicker every time new data loads. I tried to make tax and cat columns a bit smaller, check here: I will need some more comments from you on how to move forward. |
|
@Expensify/design I'd love your thoughts on this issue. I'm not really sure how to solve it yet for the reasons @Kicu laid out here. |
|
Hmm it seems like the columns are not set up the way we have them designed in Figma. In Figma, we just have the columns using a How do you have the column widths working right now? |
|
@shawnborton you can see the column styles defined here. So we have:
|
|
Ah, that does seem right. Then why is the bug in the video happening exactly? |
|
I think because we add/remove columns. In the video, we the |
|
Got it, I think that one makes the most sense to me. |
This makes the most sense to me too. I don't think we want columns popping in and out of existence based on sort order. |
Yeah I also agree with that, looking as a user of visual interfaces the constant jumping of columns is quite confusing. So how do you wanna return this from backend @luacmartins - a new field in onyx response for Also a temp solution might be to hardcode this in web before June 12th, since we do have capacity in here to deliver something in web quite fast I think. |
|
We agreed to use policy settings to determine the columns that should be shown, e.g. if the user has a policy with |
|
@luacmartins Sounds good 👍 So may I suggest we merge this PR? it has a very small fix for undefined It will be easier to create this as a separate PR instead of continually updating this PR |
|
@Kicu could you also disable sorting on the report views please? e.g. |
luacmartins
left a comment
There was a problem hiding this comment.
We need to disable sorting on the hybrid report views, e.g. Shared, Drafts, Finished
|
@luacmartins Changes done, we now have a list of what is sortable: I also added small code tweaks, but did not change any logic, just moved stuff around. sorting allowed
sorting disallowed
|
|
@luacmartins added new commit:
|
Hmm yeah, also I thought those buttons/that column was supposed to have a fixed width around 80px so that all the buttons would end up being the same width, regardless of what action it was? (Even if they're all |
|
Yup - that's my exact understanding as well. |
|
Cool, I can fix the action button width in a follow up since that's not specific to this PR. Also, I've noticed that sorting by tax amount is still not implemented in the backend so we need to disable that too. I'll address that in the same follow up though |
Reviewer Checklist
Screenshots/Videosweb.movAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
✋ 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 production by https://github.com/luacmartins in version: 1.4.81-11 🚀
|
| const formattedTotal = TransactionUtils.getAmount(transactionItem, isExpenseReport); | ||
| const date = transactionItem?.modifiedCreated ? transactionItem.modifiedCreated : transactionItem?.created; | ||
| const merchant = TransactionUtils.getMerchant(transactionItem); | ||
| const formattedMerchant = merchant === CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT || merchant === CONST.TRANSACTION.DEFAULT_MERCHANT ? '' : merchant; |
There was a problem hiding this comment.
coming from #50794 {BZ checklist}, we decided to remove merchant === CONST.TRANSACTION.DEFAULT_MERCHANT check from here






Details
fromortoinsidetransactionItemFixed Issues
$ #42856
PROPOSAL:
Tests
Offline tests
QA 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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop