-
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
Merged
Merged
Display receipts in chat #24235
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
a3b0dd2
Disable copy to clipboard for report previews
f143e1f
Show receipt image
04d0c3b
Fix receipt image loading
7466501
Begin styling for multiple receipts
941d730
Fit images to container
cf4680f
Polish preview box on hover
f0ced3a
Only apply full width when fitting container
e695401
Add scanning in progress
4ae0c89
Fix thumbnail and add correct optimistic filename
5140fed
Fix filename when not present
4177c40
Rename IOUPreview to MoneyRequestPreview
3f7acbe
Implement whispers
0f25a34
Update MoneyRequestPreview for receipts
d97b3bb
Refactor thumbnail/image for receipts
fb4120e
Update request header, disable receipt modal, update image URI blob c…
b6280f2
Update scan in progress string
a7fe6c8
Add receipt in money request view
3a1cd71
Add receipt whisper to details
1c98982
Move receipt whisper to header
b2b9529
Show merchant and number of requests in report preview
2c9768f
Add receipt preview modal to money request view
570a5da
Add receipt title and options for preview modal
904edce
Add additional money requests indicator and refactor
ca2efcd
Add number of requests scanning in report preview subtitle
2d2e584
Refactor image component and reuse
b2ae453
Merge main
ee8e83d
Fix refactor of MoneyRequestImage
acb2956
Show comment and request count info correctly
5d61c87
Fix linting and dependency cycle
2189b1e
Run prettier
c039cd3
Update optimistic report preview data
b20f2a5
Add optimistic data for updating the report preview
12536f9
Remove MoneyRequestImage and update optimistic data
3c2a7b7
Show number of requests before comment, update optimistic data
2fcf052
Add file URI when using drag and drop
64e5b37
Address comments and update comments and docs
4aee47b
Separate status bar from header
60af804
Refactor image to different component and fix linting
143c780
Rename to areAllRequestsBeingSmartScanned
4f2726a
Fix settlement button padding and typos
02086e0
Merge branch 'main' into andrewli-displayreceipts
Li357 6d026dd
Add maxWidth to receipt preview in money request view
eb96c58
Add arrow right on report preview/iou preview
2fe3b2b
Remove test code
9ea46f9
Attach URI to file for iOS uploads, change optimistic update for whisper
a87ddcf
Merge main
739c315
Fix linting and prettier
ecd553b
Remove identifier
a5b6dff
Address comments
b28d952
Move status bar component and fix conditions
6c8be71
Fix prettier
25c91a0
Remove dependency cycle by moving getNumberOfScanningReceipts and are…
34ab456
Update Spanish translations
69b1e8f
Fix typo
5155857
Show number of additional scanning receipts in overlay
cc483cc
Separate last 3 receipts to display from total number of receipts in …
7687d7f
Remove getNumberOfScanningReceipts
4788324
Fix header name
dec55b4
Run prettier
5875061
Merge main
55a66a3
Fix weird Android image upload issue
daa7e85
Merge branch 'main' into andrewli-displayreceipts
Li357 e057aca
Use optimistic transaction in updating report preview
aad1961
Merge branch 'main' into andrewli-displayreceipts
Li357 b12644c
Access transactionID safely in case of pay IOU actions
fec32bf
Fix lint
c63f160
Merge branch 'main' into andrewli-displayreceipts
Li357 de09a89
Fix lint
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from 'react'; | ||
import {View} from 'react-native'; | ||
import styles from '../styles/styles'; | ||
import useLocalize from '../hooks/useLocalize'; | ||
import Text from './Text'; | ||
|
||
function MoneyRequestHeaderStatusBar() { | ||
const {translate} = useLocalize(); | ||
|
||
return ( | ||
<View | ||
style={[ | ||
styles.dFlex, | ||
styles.flexRow, | ||
styles.alignItemsCenter, | ||
styles.flexGrow1, | ||
styles.justifyContentBetween, | ||
styles.overflowHidden, | ||
styles.ph5, | ||
styles.pv3, | ||
styles.borderBottom, | ||
styles.w100, | ||
]} | ||
> | ||
<View style={[styles.moneyRequestHeaderStatusBarBadge]}> | ||
<Text style={[styles.textStrong, styles.textLabel]}>{translate('iou.receiptStatusTitle')}</Text> | ||
</View> | ||
<View style={[styles.flexShrink1]}> | ||
<Text style={[styles.textLabelSupporting]}>{translate('iou.receiptStatusText')}</Text> | ||
</View> | ||
</View> | ||
); | ||
} | ||
|
||
MoneyRequestHeaderStatusBar.displayName = 'MoneyRequestHeaderStatusBar'; | ||
|
||
export default MoneyRequestHeaderStatusBar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 is a global change, is this really needed? Can we use the w100 and h100 just for the instance where it's actually 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.
I don't think this is easily doable without refactoring a lot of ReportActionItemImage's use of RenderHTML. I can do this in a followup PR.
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 is the line that causes #25678 unfortunately, can we think of a way to update it without refactoring everything else?