[No QA] Add violations to inline submit#54898
Conversation
|
@hungvu193 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] |
|
@hungvu193 this PR is on hold for merge because it's based on the holding PRs branch, but we can start reviewing/testing. |
|
Taking a look 👀 |
|
It's working well. It looks like we have a lot of linings for the default id, are we gonna fix it? Screen.Recording.2025-01-10.at.16.32.51.movScreen.Recording.2025-01-10.at.17.31.47.mov |
No, I wasn't planning to fix that as part of this PR since some of them are quite complex and it'd distract from the main point of the PR. |
|
@hungvu193 updated! I also fixed the ESLint errors. Hopefully I didn't break anything along the way |
|
Hey @luacmartins What's the best way to make a violation report? 😄 |
You could:
|
|
Nice. I'll take a look today |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-01-16.at.16.01.33.movAndroid: mWeb ChromeScreen.Recording.2025-01-16.at.17.56.46.moviOS: NativeScreen.Recording.2025-01-16.at.17.24.03.moviOS: mWeb SafariScreen.Recording.2025-01-16.at.17.54.34.movMacOS: Chrome / SafariScreen.Recording.2025-01-16.at.15.25.46.movMacOS: DesktopScreen.Recording.2025-01-16.at.15.35.26.mov |
|
@cristipaval 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] |
lakchote
left a comment
There was a problem hiding this comment.
LGTM. Reviewing since I have context on Search, and because Carlos had a lot of conflicts on that one.
|
✋ 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/lakchote in version: 9.0.87-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.0.87-3 🚀
|
| !showRTERViolationMessage && | ||
| !shouldShowBrokenConnectionViolation && | ||
| (iouReport?.ownerAccountID === currentUserAccountID || isAdmin || iouReport?.managerID === currentUserAccountID); | ||
| const shouldShowSubmitButton = canSubmitReport(iouReport, policy, transactionIDList, transactionViolations); |
There was a problem hiding this comment.
@luacmartins Can you help me understand the logic behind using only 1st transaction to check for violations here? Since this will create weird submit behaviour on report preview and report header.
There was a problem hiding this comment.
Oh nice catch! This was a bad refactor for the lint rules. We should be using all report transactions. Is it being fixed somewhere else already?
There was a problem hiding this comment.
Cool, thanks for handling it!
Explanation of Change
Adds the missing violation logic to
IOU.canSubmitReportand extracts that into a reusable function. I also tried to handle as many of theDo not default string IDs to any value.ESLint errors, but some got quite convoluted and I didn't want to distract too much from the main change, so I left them for a follow up PR.Fixed Issues
$ #54910
Tests
Delayed submissionSubmitas the action buttonsnapshot_key and thetransactionIDfrom OnyxbrokenCardConnectionviolation to transaction violations. Example:ViewSubmitaction is shown again (since the refresh wiped the manual data we inserted)ViewactionOffline tests
N/A
QA Steps
Regular TCs for Submit functionality
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
Screen.Recording.2025-01-07.at.3.24.32.PM.mov
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop