Repository navigation
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] |
tylerkaraszewski
left a comment
There was a problem hiding this comment.
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.
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.
This should apply for receipts that are image AND start with blob or file, no?
There was a problem hiding this comment.
I'm confused, isn't image && (blob || file) what I have here?
There was a problem hiding this comment.
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
ScanoptionOffline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.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