-
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
Fix displaying edited amount in IOU preview for scan failed receipt #36407
Conversation
@Ollyws Should I do something about this ? Or you will do it |
Something about that "Receipt missing details" text doesn't look right to me. @JmillsExpensify @trjExpensify is that how that message is supposed to show? Other violations get displayed a bit differently (see screenshot) but I'm not sure if this is really the same thing. |
Yep, agree with Danny. It would be best to put that in the dot separator placement. If there's a merchant or description added, it would go where you've currently got |
It doesn't look like this design has been implemented yet, is that something in the pipeline or should that be implemented in this PR? |
I think the pattern does exist, just only on paid workspace plans that have violations. CC: @JmillsExpensify |
Adding violations to the report preview is being added in #33969 so we should probably HOLD on that one. |
#33969 has been merged and as @trjExpensify mentioned it only applies to paid workspaces plans that have violations, with the violations beta enabled. |
I'm not sure when we'll take violations off the beta, @cead22 might have a better idea. |
We don't have a date for taking violations off beta, but we can add whatever logins you're using to the beta if you need to test, just share them with us |
If violations isn't getting taken off beta in the forseeable future then I'm not sure if this design is something that should be implemented in this PR. |
This is already implemented |
Yeah, SmartScan errors aren't conditional on a violations beta either, so isn't it just taking the design pattern that Carlos references exists in the code and applying it to this case of a failed receipt scan that you edit only some of the fields required but still have violations? So these here would be displayed after the dot separator in the preview component. |
Ok, so it should be as simple as appending the smartscan errors to the header text message. |
The current solution only displays |
message += ` • ${translate('iou.missingMerchant')}`; | ||
} | ||
|
||
return message; |
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.
The problem with an early return here is that if we have both violations and a smartscan error, only the smartscan error will be displayed where it should display Review required
.
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.
In #36407 (comment) I specified that neither should take priority, so if there is a smartscan error and a violation then we should show Review required
.
Unless I'm missing something here.
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.
@Ollyws, @trjExpensify, @cead22, @shawnborton Can you give me a detailed specification for all possible cases to follow it . My current changes match this comment . But as you can see @Ollyws doesn't agree with this? I need a clear description for all cases
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.
In #36407 (comment) I specified that neither should take priority, so if there is a smartscan error and a violation then we should show Review required.
I agree with that. It's effectively "multiple violations" in that case.
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.
@Ollyws @trjExpensify Sorry, but the information provided is not enough to understand. Can you explain what is the difference of #36407 (comment) and #36407 (comment) comments . Does not it show Review required
if there are both smart scan and violations errors ?
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.
@shahinyan11 What #36407 (comment) is saying is if there is one item (violation/smartscan error) then we display that item: Cash • Missing amount
for example.
If there is more than one item we display Cash • Review required
.
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.
@Ollyws It turns out the Review required
should be displayed there If only merchant or only amount is missing and there is a violation errors . Is it correct ?
341a547
to
a7b6d6a
Compare
src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx
Outdated
Show resolved
Hide resolved
src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx
Outdated
Show resolved
Hide resolved
src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx
Outdated
Show resolved
Hide resolved
Reviewer Checklist
Screenshots/VideosAndroid: Native01_Android_Native.mp4Android: mWeb Chrome02_Android_Chrome.mp4iOS: Native03_iOS_Native.mp4iOS: mWeb Safari04_iOS_Safari.mp4MacOS: Chrome / Safari05_MacOS_Chrome.mp4MacOS: Desktop06_MacOS_Desktop.mp4 |
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.
One thing I'll mention but I think is out of scope here, is that on dev and staging the Screen.Recording.2024-03-07.at.15.26.33.mov |
I think that's fine and is certainly a backend issue. |
✋ 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/techievivek in version: 1.4.51-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.4.51-3 🚀
|
Details
Fixed Issues
$ #34418
PROPOSAL: #34418 (comment)
Tests
Offline tests
N/A
QA Steps
Same as in the Tests section.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.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 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
Screen.Recording.2024-02-29.at.13.50.11.mov
Android: mWeb Chrome
2024-02-29.13.27.50.mp4
iOS: Native
Screen.Recording.2024-02-29.at.14.04.43.mov
iOS: mWeb Safari
Untitled.mov
MacOS: Chrome / Safari
Screen.Recording.2024-02-29.at.12.45.17.mov
MacOS: Desktop
Screen.Recording.2024-02-29.at.13.01.49.mov