Add dropdown button to empty report#64924
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid-app-2025-07-02_21.17.43.mp4Android: mWeb Chromeandroid-chrome-2025-07-02_21.22.45.mp4iOS: HybridAppiOS: mWeb Safariios-safari-2025-07-02_21.35.18.mp4MacOS: Chrome / Safaridesktop-chrome-2025-07-02_20.37.03.mp4MacOS: Desktopdesktop-app-2025-07-02_20.45.09.mp4 |
From the issue, it looks like the button in the header should also be removed, or am I missing some extra context? |
|
@jjcoffee @sumo-slonik can you please add screenshots to explain what exactly you mean? cc @flaviadefaria @trjExpensify @JmillsExpensify |
|
@jjcoffee Yes, you're right, I'm removing it from the header now. |
|
I was busy today fixing a deploy blocker in navigation, I'll take care of this tomorrow. |
|
@trjExpensify @jjcoffee It seems to me that everything is as it should be now: Screen.Recording.2025-07-01.at.12.52.08.mov |
|
Yep!! |
|
@jjcoffee Do you think you'll have time to go over it? |
|
@sumo-slonik Sure, I will get to it later today! |
src/languages/es.ts
Outdated
| moneyRequestReport: { | ||
| emptyStateTitle: 'Este informe no tiene gastos.', | ||
| emptyStateSubtitle: 'Puedes añadir gastos a este informe usando el botón de arriba.', | ||
| emptyStateSubtitle: 'Puedes agregar gastos a este informe\\n usando el botón de abajo o la opción "Agregar gasto" en el menú Más de arriba.', |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
|
||
| const isPayActionWithAllExpensesHeld = isPrimaryPayAction(report, policy, reportNameValuePairs, isChatReportArchived) && hasOnlyHeldExpenses(report?.reportID); | ||
|
|
||
| if (isAddExpenseAction(report, reportTransactions, isChatReportArchived)) { |
There was a problem hiding this comment.
We can remove the isAddExpenseAction function itself too, I think.
There was a problem hiding this comment.
it is still used in function getReportPreviewAction()
This comment was marked as resolved.
This comment was marked as resolved.
|
@sumo-slonik I get a crash whenever I open an expense report (even a non-empty one). Reproducible on main so it's not this PR, but I can't really test fully otherwise! Did you test with a ios-app-2025-07-02_21.47.07.mp4 |
|
I'm getting back to this and taking care of the comments. |
|
@jjcoffee On main, I still can't create a report on android-native. I believe this issue is not related to my PR, especially since all the comments mentioned above have been addressed. |
|
@sumo-slonik Okay, thanks for looking into it! I have to finish for today soon, so I think we can wait until Monday and hope the issue is resolved. |
|
@jjcoffee can you please also test on main to ensure its not specific to this PR? thanks! @sumo-slonik can you please sync up with main? thanks! |
|
@jjcoffee all yours |
|
I can still repro the crash, but also on main, so maybe we should just proceed? |
|
For this, it feels a bit awkward to only scroll the empty view. I think it might make more sense to scroll the whole view, the same as what happens if you send a message on the report. ios-safari-scroll-2025-07-07_15.44.38.mp4 |
I think I can do it that way. The other solution felt more intuitive to me, since the empty screen appears in more than one scenario in the reports, so wrapping just that part in a ScrollView seemed less invasive. However, doing it at the level of the entire report will definitely be more consistent. I’ll take care of it today. |
|
Let me just get a gut check from @Expensify/design on this. Does it make sense to scroll the empty view separately from the list of (custom) report fields? I'm unsure if we do it elsewhere in the app, and my concern would be that if there are even more fields, we'd end up scrolling a tiny space where the empty view sits. |
|
My expectation would be that the whole view scroll like in the video attached in the comment. Would like a gut check from @shawnborton and @dannymcclain though. |
|
@sumo-slonik Do you think it's worth splitting this out into a separate issue? It's not anything introduced by this PR, other than that the empty view is slightly longer due to the button. |
|
Totally agree with Jon there - it should behave like any other report where the space between the fixed top header and the fixed bottom composer is what scrolls. |
|
Agree with Shawn and Jon! |
|
I was dealing with deployment blockers yesterday. I'm getting back to it now |
I don't think there's any reason to split it into separate PR. I'll do it today as part of this PR and let you know when it's ready. |
|
@jjcoffee I think it's finally working as it should: Screen.Recording.2025-07-09.at.11.13.57.mov |
| type MoneyRequestReportTransactionListProps = { | ||
| report: OnyxTypes.Report; | ||
|
|
||
| policy?: OnyxTypes.Policy; |
| value: CONST.REPORT.ADD_EXPENSE_OPTIONS.ADD_UNREPORTED_EXPENSE, | ||
| text: translate('iou.addUnreportedExpense'), | ||
| icon: Expensicons.ReceiptPlus, | ||
| onSelected: () => { |
There was a problem hiding this comment.
Should this be here too?
| onSelected: () => { | |
| onSelected: () => { | |
| if (!reportId) { | |
| return; | |
| } |
|
✋ 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/mountiny in version: 9.1.79-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.1.79-11 🚀
|

Explanation of Change
Fixed Issues
$ #64730
PROPOSAL:
Tests
Offline tests
Unnesesary
QA Steps
Same as test
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)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
Screen.Recording.2025-06-27.at.19.17.38.mov
Android: mWeb Chrome
android.web.1.mov
iOS: Native
ios.native.mov
iOS: mWeb Safari
web.ios.mov
MacOS: Chrome / Safari
web.mac.mov
MacOS: Desktop
desktop.mov