order options by the last expense request time in "Submit Expense" flow#49568
Conversation
| } | ||
|
|
||
| // Add a field to sort the recent reports by the time of last IOU request | ||
| if (action) { |
There was a problem hiding this comment.
A query I have is: Do we want to apply this ordering just to the create action? Because with at the moment this will also apply to sharing and categorizing.
There was a problem hiding this comment.
Yes, I think we should use it only for CREATE.
There was a problem hiding this comment.
Perhaps it would be a little cleaner if we made this condition dependent on preferRecentExpenseReports, seeing as we're defining that as action === CONST.IOU.ACTION.CREATE.
| excludeLogins = [], | ||
| preferChatroomsOverThreads = false, | ||
| preferPolicyExpenseChat = false, | ||
| action, |
There was a problem hiding this comment.
perhaps it would be better to define preferRecentExpenseReports here and then we can put the action === CONST.IOU.ACTION.CREATE condition in MoneyRequestParticipantsSelector
Reviewer Checklist
Screenshots/Videos |
| tabIndex?: 0 | -1; | ||
| isConciergeChat?: boolean; | ||
| isBold?: boolean; | ||
| lastIOUTime?: string; |
There was a problem hiding this comment.
| lastIOUTime?: string; | |
| lastIOUCreationDate?: string; |
Just trying to see if we can make this a bit more descriptive
| // When option.login is an exact match with the search value, returning 0 puts it at the top of the option list | ||
| return 0; | ||
| }, | ||
| // For Submit Expense flow, prioritze the most recent expense reports and then policy expense chats (without expense requests) |
There was a problem hiding this comment.
| // For Submit Expense flow, prioritze the most recent expense reports and then policy expense chats (without expense requests) | |
| // For Submit Expense flow, prioritize the most recent expense reports and then policy expense chats (without expense requests) |
|
✋ 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/MariaHCD in version: 9.0.41-0 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.41-10 🚀
|






Details
Change the order of options in the "Submit Expense" flow to:
Fixed Issues
$ #48608
PROPOSAL: #48608 (comment)
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
iouAndroid.mp4
Android: mWeb Chrome
iouAndroidmWeb.mp4
iOS: Native
iouiOS.mp4
iOS: mWeb Safari
iouiOSmWeb.mp4
MacOS: Chrome / Safari
iouChrome.mp4
MacOS: Desktop
iouDesktop.mp4