-
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
Load generic receipt thumbnail for other file formats #25969
Conversation
The correct image seems to be used only optimistically, after API respose we seem to be using the wrong image. Screen.Recording.2023-08-25.at.8.27.40.PM.mov |
Yes, it seems that we convert these file formats to pdf in the backend. I don't think this is a blocker for this PR though. |
Reviewer Checklist
Screenshots/VideosiOSAndroid |
@tylerkaraszewski 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.
I don't understand why this change works? Can I get a short explanation as to why this makes a difference?
// For local files, we won't have a thumbnail yet | ||
if (path.startsWith('blob:') || path.startsWith('file:')) { | ||
if (isReceiptImage && (path.startsWith('blob:') || path.startsWith('file:'))) { |
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.
Logically, the &&
has higher precedence here, meaning this applies for images that start with blob:
or any other file, right? I'm not sure if that's the intended behavior or if what we want is any image that starts with blob:
or file:
to return 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.
This should apply for receipts that are image AND start with blob or file, no?
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.
I'm confused, isn't image && (blob || file)
what I have 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.
Maybe I misread this. It definitely looks like this now.
✋ 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/tylerkaraszewski in version: 1.3.59-0 🚀
|
🚀 Deployed to staging by https://github.com/tylerkaraszewski in version: 1.3.60-0 🚀
|
🚀 Deployed to staging by https://github.com/tylerkaraszewski in version: 1.3.60-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.59-5 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.60-3 🚀
|
Details
Make sure we load generic thumbnails for html, doc, docx, svg and pdf file formats
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/311482
Tests
Scan
optionOffline tests
N/A
QA Steps
Same as tests
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
web.mov
Mobile Web - Chrome
chrome.mov
Mobile Web - Safari
safari.mov
Desktop
desktop.mov
iOS
N/A only supports images nowAndroid
N/A only supports images now