-
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
Follow ups to Broken Connection with direct feeds #57242
Follow ups to Broken Connection with direct feeds #57242
Conversation
@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] |
@DylanDylann can you please complete the review here? |
@joekaufmanexpensify Could you help to set up my accounts to test this PR? |
🚧 @mountiny has triggered a test build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
🚧 @mountiny has triggered a test 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! 🧪🧪
|
Confirmed! The violation is not live updating, but when you click into the expense, it is there for the admin viewing their own expenses. 2025-02-25_10-25-14.mp4 |
Confirmed! Violation on open and processing expenses with mark as cash for both. 2025-02-25_10-33-39.mp4
Violation and no mark as cash on approved. 2025-02-25_10-34-21.mp4 |
Confirmed. Admin can see violation on employee's expense on an open report. 2025-02-25_10-37-46.mp4 |
Thank you @joekaufmanexpensify! |
Sure, I am on it |
Reviewer Checklist
Screenshots/VideosAndroid: mWeb Chrome
![]()
Screen.Recording.2025-02-26.at.21.22.25.moviOS: Native
![]()
Screen.Recording.2025-02-26.at.21.19.43.moviOS: mWeb Safari1. In the employee view![]()
Screen.Recording.2025-02-26.at.21.21.13.mov |
if (!isPolicyAdmin(policy) || isCurrentUserSubmitter(report?.reportID)) { | ||
return true; | ||
} | ||
return isOpenExpenseReport(report) || (isProcessingReport(report) && isInstantSubmitEnabled(policy)); |
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.
@VickyStash Could you help to explain why do we need to add isInstantSubmitEnabled
condition?
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.
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.
@DylanDylann Let me double check it to be sure!
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.
@DylanDylann That's mentioned in the doc:
- Admins can see this violation on open reports (which makes it clear why the submit button is either hidden, or submitting splits some expenses to a new report) and processing reports with instant submit (which clarifies why the approve/pay button is hidden, or why taking that action splits some expenses to a new report.)
- Admins can’t see this violation on processing reports (with delayed submission), approved reports, or paid reports (same as OldDot.)
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.
Thanks! One questions but please add it as a follow up
@@ -830,7 +840,24 @@ function shouldShowBrokenConnectionViolation( | |||
} | |||
|
|||
const brokenConnectionViolations = violations.filter((violation) => isBrokenConnectionViolation(violation)); | |||
return brokenConnectionViolations.length > 0 && (!isPolicyAdmin(policy) || isOpenExpenseReport(report) || (isProcessingReport(report) && isInstantSubmitEnabled(policy))); | |||
|
|||
if (brokenConnectionViolations.length > 0) { |
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.
@VickyStash Could you please write unit test covering the shouldShowBrokenConnectionViolation
logic?
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.
✋ 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.7-1 🚀
|
@joekaufmanexpensify Looks like our applause QA team could not test this PR. Could this be verified internally? |
@kavimuru Yeah, this one should be internal QA. I will QA it now and then mark it on the checklist when done. |
QA'ed on staging and all looks good! |
Thanks! |
🚀 Deployed to production by https://github.com/puneetlath in version: 9.1.7-2 🚀
|
Explanation of Change
Fixes for broken connection violations display
Fixed Issues
$ #57162
PROPOSAL: N/A
Tests
Pre-steps
Receipts to test with: you can find in slack.
Test steps:
Mark as cash
button are displayed.Offline tests
Same, as in the Tests section.
QA Steps
Same, as in the Tests section.
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
Android: Native
Admin view:

Member - processing view:

Member - approved view:

Member - open view:

Android: mWeb Chrome
Admin view:

Member - processing view:

Member - approved view:

Member - open view:

iOS: Native
Member - processing view:

Member - approved view:

Member - open view:

Admin view:

iOS: mWeb Safari
Member - open view:

Member - approved view:

Member - processing view:

Admin view:

MacOS: Chrome / Safari
Member - processing view:

Member - approved view:

Member - open view:

Admin view:

MacOS: Desktop
Member - processing view:

Member - approved view:

Member - open view:

Admin view:
