-
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
[NoQA] [Wave 8 - ECard Transactions] Create eReceiptThumbnail
and eReceipt
components
#29075
Conversation
Deploying with
|
Latest commit: |
b8c3300
|
Status: | ✅ Deploy successful! |
Preview URL: | https://31c90cd5.helpdot.pages.dev |
Branch Preview URL: | https://georgia-cardtransactionserec-y44f.helpdot.pages.dev |
eReceiptThumbnail
and eReceipt
component
Hey @fedirjh this is failing travis due to storybook changes, I think it's unrelated to this PR and no one has updated storybook in awhile. Would you want to do a code review now? We are not using them in App. **note: ** |
Reviewing shortly. |
@Li357 bump on final review! Wave 8 :) |
eReceiptThumbnail
and eReceipt
componenteReceiptThumbnail
and eReceipt
components
eReceiptThumbnail
and eReceipt
componentseReceiptThumbnail
and eReceipt
components
return backgroundImages[StyleUtils.getEReceiptColorCode(transaction)]; | ||
} | ||
|
||
function EReceiptThumbnail({transaction}) { |
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.
Yeah but dont we have to add it here same as you have it in the eReceipt.js?
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.
Add what
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 felt like the transactionID should be here too, but its not used in the component and for withOnyx its enough when mentioned in the propTypes. so no problem
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.
Thanks!
{backgroundColor: colors.green800, color: colors.green400}, | ||
{backgroundColor: colors.tangerine800, color: colors.tangerine400}, | ||
{backgroundColor: colors.pink800, color: colors.pink400}, | ||
const eReceiptColorStyles: Partial<Record<EReceiptColorName, EreceiptColorStyle>> = { |
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.
NAB: EreceiptColorStyle -> EReceiptColorStyle
✋ 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 production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀
|
1 similar comment
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀
|
const [containerWidth, setContainerWidth] = useState(0); | ||
const [containerHeight, setContainerHeight] = useState(0); | ||
|
||
const onContainerLayout = (event) => { |
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.
Details
It creates (but does not use) the eReceipt Thumbnail and eReceipt Components. This will be used as the "image" preview for eReceipts in the Report Preview.
This is how it is going to be used later:
This PR uses styles from https://github.com/Expensify/App/pull/27204/files
Fixed Issues
$ #28826
$ #28828
Tests
Screen.Recording.2023-10-09.at.12.09.47.PM.mov
Note: storybook was not updating with styles.js, see screenshots from web for correct currency font size
Screen.Recording.2023-10-07.at.7.40.09.PM.mov
To display the full eReceipt, the user must have both the transaction and the card in the cardList
QA Steps
NO QA
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
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android