-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Display receipts in chat #24235
Display receipts in chat #24235
Conversation
@Li357 @luacmartins @mountiny Do we need to QA this one or no? |
@mvtglobally I'll update this! QA is same as the listed steps under Tests |
@situchan This PR unblocks a lot of internal issues so I don't think a revert is good here. Let's fix these linked issues ASAP! |
Hey team - just a friendly reminder, when we're merging lots of UI changes like this, please please please tag the design team for review. I already see a few things we missed that will need to be fixed in a follow up PR. For example, on the scan banner, why is the text on the right right-aligned? |
Hey @shawnborton, sorry about missing the procedure here, will do moving forward. The screenshot is actually old before the width had been clarified, currently we show the receipt preview on web with a max width: Would you be able to do a design review in this PR? I'm consolidating a few smaller issues there. I'm also technically OOO now but here so we can move this forward without any regressions for external commits. |
Yup, mind tagging me in the PR and I'll give it a look? |
Hi! According to
EDIT: it's this line, adding the w100 and h100 styles. |
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.56-24 🚀
|
isHovered={props.isHovered} | ||
shouldUseCardBackground | ||
/> | ||
{requestMerchant && ( |
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.
Caused this regression: #25616
const isLastImage = index === numberOfShownImages - 1; | ||
return ( | ||
<View | ||
key={image} |
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.
If the image
value is not a local file or image type, then the key may be duplicated (pdf, doc, html, etc), causing rendering issue
</> | ||
)} | ||
</View> | ||
<Icon src={Expensicons.ArrowRight} /> |
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 caused #25692 as we forgot to add the fill
colour of the above icon.
This PR introduced this bug because we didn't wrap images without thumbnail in a pressable component |
checkIfContextMenuActive: toggleContextMenuFromActiveReportAction, | ||
}} | ||
> | ||
<OfflineWithFeedback pendingAction={props.action.pendingAction}> |
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.
Coming from #27697 It was missed that the "Receipt scan in progress…" message doesn't always display in the report preview |
@@ -177,6 +185,14 @@ function IOUPreview(props) { | |||
return message; | |||
}; | |||
|
|||
const getDisplayAmountText = () => { |
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.
Hi, we didn't handle offline behavior for this function. It defaulted to showing amount as $0.
Details
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/295245
We're bringing SmartScan receipts to NewDot!
Tests
Before testing and before the Auth/Web-E changes make it to staging, please pull my branches https://github.com/Expensify/Auth/pull/8494 and #24235 to test! Remember to rebuild Auth + restart.
Note that for all tests: adding money requests to an IOU report that already exists via Global Create creates an extra IOU report action item, because the reportID is not in the URL when going thru Global Create. This is not in scope here, but we can fix in a later PR. For everything except for Test 1 step 1, use the + button the chat to create requests.
Test 1
Test 2
Test 3
Offline tests
Most functionality should work offline, since we optimistically create/update the report previews and IOU report actions. In particular:
Test 1: steps 0-10 on a new account C
Test 2: all steps
QA Steps
Same as manual tests above
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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
Screen.Recording.2023-08-15.at.1.17.41.AM.mov
Screen.Recording.2023-08-15.at.2.02.01.AM.mov
Mobile Web - Chrome
Mobile Web - Safari
Simulator.Screen.Recording.-.iPhone.14.16.1.-.2023-08-16.at.16.44.07.mov
Desktop
Screen.Recording.2023-08-16.at.4.17.46.PM.mov
iOS
Simulator.Screen.Recording.-.iPhone.14.16.1.-.2023-08-16.at.16.06.07.mp4
Android