[Better Expense Report View] Keep the Report fields at the top of the table report view#59724
Conversation
src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx
Outdated
Show resolved
Hide resolved
src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx
Outdated
Show resolved
Hide resolved
src/components/MoneyRequestReportView/MoneyRequestViewReportfields.tsx
Outdated
Show resolved
Hide resolved
src/components/MoneyRequestReportView/MoneyRequestViewReportfields.tsx
Outdated
Show resolved
Hide resolved
src/components/MoneyRequestReportView/MoneyRequestViewReportfields.tsx
Outdated
Show resolved
Hide resolved
src/components/MoneyRequestReportView/MoneyRequestViewReportfields.tsx
Outdated
Show resolved
Hide resolved
…port-fields-top-of-table
|
@DylanDylann 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] |
|
🚧 @mountiny has triggered a test app build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
src/components/MoneyRequestReportView/MoneyRequestViewReportFields.tsx
Outdated
Show resolved
Hide resolved
src/components/MoneyRequestReportView/MoneyRequestViewReportFields.tsx
Outdated
Show resolved
Hide resolved
src/components/MoneyRequestReportView/MoneyRequestViewReportFields.tsx
Outdated
Show resolved
Hide resolved
…-top-of-table' of github.com:software-mansion-labs/expensify-app-fork into @borys3kk-better-exponse-report-view-keep-report-fields-top-of-table
|
@borys3kk I noticed a weird lint error
|
src/components/MoneyRequestReportView/MoneyRequestViewReportFields.tsx
Outdated
Show resolved
Hide resolved
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-04-17.at.21.46.29.movAndroid: mWeb ChromeScreen.Recording.2025-04-17.at.21.46.00.moviOS: NativeScreen.Recording.2025-04-17.at.21.47.19.moviOS: mWeb SafariScreen.Recording.2025-04-17.at.21.46.48.movMacOS: Chrome / SafariScreen.Recording.2025-04-17.at.21.44.34.movMacOS: DesktopScreen.Recording.2025-04-17.at.21.44.55.mov |
yeah its weird that eslint thinks its an error since in contributing guidelines it appears as an correct example |
mountiny
left a comment
There was a problem hiding this comment.
Yeah lets fix the eslint failures, I think we can leave that null coalesce empty in there as the reportId is string
|
Hi, I've fixed all eslint errors |
mountiny
left a comment
There was a problem hiding this comment.
Small comments, nice work!
src/components/MoneyRequestReportView/MoneyRequestViewReportFields.tsx
Outdated
Show resolved
Hide resolved
|
@borys3kk Please ping me when the PR ready again |
|
@DylanDylann pr ready |
| /> | ||
| </OfflineWithFeedback> | ||
| ); | ||
| } |
| const isPaidGroupPolicyExpenseReport = isPaidGroupPolicyExpenseReportUtils(report); | ||
| const isInvoiceReport = isInvoiceReportUtils(report); | ||
|
|
||
| const shouldDisplayReportFields = (isPaidGroupPolicyExpenseReport || isInvoiceReport) && policy?.areReportFieldsEnabled && (!isOnlyTitleFieldEnabled || !isCombinedReport); |
There was a problem hiding this comment.
I wonder if in general it would be cleaner to refactor this method to do early returns so we can stop the execution immediately we know the report fields should not be displayed, for example if policy?.areReportFieldsEnabled is false
|
✋ 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.32-0 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 9.1.32-8 🚀
|
| shouldShowRightIcon | ||
| disabled={reportField.isFieldDisabled} |


Explanation of Change
Added ReportFields in desired view.
Created component responsible for displaying report fields.
Fixed Issues
$#59061
PROPOSAL:
Prerequisite for tests is that you have to have report fields enabled in workspace settings (added manually or imported from workspace).
Tests
Offline tests
When in view described above after disconnecting from internet and changing one of the fields it should become greyed out.
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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
android-native.mov
Android: mWeb Chrome
android-web.mov
iOS: Native
ios-native.mov
iOS: mWeb Safari
ios-web.mov
MacOS: Chrome / Safari
macos-web.mov
MacOS: Desktop
macos-desktop.mov