-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@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] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, thanks for handling it!
Explanation of Change
Adds the missing violation logic to
IOU.canSubmitReport
and 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 submission
Submit
as the action buttonsnapshot_
key and thetransactionID
from OnyxbrokenCardConnection
violation to transaction violations. Example:View
Submit
action is shown again (since the refresh wiped the manual data we inserted)View
actionOffline tests
N/A
QA Steps
Regular TCs for Submit functionality
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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