Add Report creation related options to Simplified actions button#60887
Conversation
5b15bda to
4ccf3c0
Compare
|
@jnowakow please make sure that we only should use canBeMissing is true if the component can render if we miss that field |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeScreen.Recording.2025-04-29.at.11.53.28.moviOS: NativeScreen.Recording.2025-04-29.at.11.52.41.moviOS: mWeb SafariScreen.Recording.2025-04-29.at.11.50.30.movMacOS: Chrome / SafariScreen.Recording.2025-04-29.at.11.45.32.movMacOS: DesktopScreen.Recording.2025-04-29.at.11.48.36.mov |
|
Minor comment: #60887 (comment) the rest looks fine |
|
Kuba asked me to take care of it, I'll take a look at it today. |
|
I think canBeMissing is already fixed. |
|
Inteeeresting. So we need a @mountiny review and merge it here then? |
|
I think so, that we can move forward with this. |
luacmartins
left a comment
There was a problem hiding this comment.
LGTM. We should add some tests to the following test files, but I won't block on it for this PR. Let's handle it in a follow up.
PrimaryUtils - https://github.com/Expensify/App/blob/13b54278a67986c08432cc440e5e3f790aeba0e3/tests/unit/ReportPrimaryActionUtilsTest.ts
SecondaryUtils - https://github.com/Expensify/App/blob/13b54278a67986c08432cc440e5e3f790aeba0e3/tests/unit/ReportSecondaryActionUtilsTest.ts
ReportPreview - https://github.com/Expensify/App/blob/13b54278a67986c08432cc440e5e3f790aeba0e3/tests/actions/ReportPreviewActionUtilsTest.ts
|
✋ 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: 9.1.38-0 🚀
|
|
@SzymczakJ For the second part of the test steps, since this is a beta feature and requires Expensifail accounts, how can we get access to a workspace with its grace period past? |
|
That is fair, maybe @trjExpensify could help qa this by adding some of his email/ private domain to the beta? |
|
I have trj.chat on the beta. What do we need? An account with an overdue balance? Sheesh... let me look. |
|
Boom, got one. tom+trackguy121@trj.chat
2025-05-01_00-16-12.mp4Looks like it's a pass. Though @SzymczakJ when you're back, I don't see the need to show the choose workspace screen when the user only has the one, so we could go straight to the action restricted screen. |
|
🚀 Deployed to production by https://github.com/thienlnam in version: 9.1.38-4 🚀
|
That makes sense. I'll fix it along with fixing #61186 @trjExpensify |
| shouldShowBrokenConnectionViolation as shouldShowBrokenConnectionViolationTransactionUtils, | ||
| } from './TransactionUtils'; | ||
|
|
||
| function isAddExpenseAction(report: Report, reportTransactions: Transaction[]) { |
There was a problem hiding this comment.
Coming from: #62958, we should add the condition to check if it's ChatReportArchived
Explanation of Change
In the context of simplified report actions, this PR adds "Add expense" primary button for empty reports and a "Add expense" secondary button for Reports that already have the expense and satisfy
canAddTransactioncheck.It also restricts Create report action in FAB and Workspace chats so that the user cannot create a report, when the chosen policy is pas it's grace period.
Fixed Issues
$ #57656
PROPOSAL:
Tests
Testing Simplified report actions:
Test restricts "Create report" action in FAB and Workspace chats.
Offline tests
QA Steps
Same as tests
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop