-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[TS migration] Migrate 'ReportActionItemReportPreview.js' component to TypeScript #34374
[TS migration] Migrate 'ReportActionItemReportPreview.js' component to TypeScript #34374
Conversation
…omponent # Conflicts: # src/libs/ReportUtils.ts # src/types/onyx/OriginalMessage.ts
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.
LGTM
…omponent # Conflicts: # src/components/ReportActionItem/ReportPreview.tsx
…omponent # Conflicts: # src/libs/ReportUtils.ts # src/pages/home/report/ContextMenu/ReportActionContextMenu.ts # src/types/onyx/OriginalMessage.ts
…omponent # Conflicts: # src/components/ReportActionItem/ReportPreview.tsx # src/libs/ReportUtils.ts # src/types/onyx/OriginalMessage.ts
@situchan kind bump 🙂 |
…omponent # Conflicts: # src/components/ReportActionItem/ReportPreview.tsx
reviewing today |
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.
Minor comments, don't want to stop this PR, LGTM!
@@ -31,7 +31,7 @@ type TransactionViolation = { | |||
}; | |||
}; | |||
|
|||
type TransactionViolations = Record<string, TransactionViolation>; | |||
type TransactionViolations = TransactionViolation[]; |
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.
Are you sure about this change?
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 type is used in TransactionViolations collection. And a collection of TransactionViolations is a collection of arrays, not objects
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 change is correct. Good catch!
…omponent # Conflicts: # src/components/ReportActionItem/ReportPreview.tsx # src/libs/ReportUtils.ts
@situchan kind bump 🙂 |
@@ -31,7 +31,7 @@ type TransactionViolation = { | |||
}; | |||
}; | |||
|
|||
type TransactionViolations = Record<string, TransactionViolation>; | |||
type TransactionViolations = TransactionViolation[]; |
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 change is correct. Good catch!
containerStyles, | ||
contextMenuAnchor, | ||
transactions, | ||
transactionViolations, |
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.
Why don't we keep original default values?
i.e. iouReport = {}, chatReport = {}, transactions: {}, transactionViolations: {violations: []}
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.
@situchan Since it all are onyx values they have null
in their typing. That's mean that cases where the value is null will be handled by the app anyway (with optional chaining, conditions), so no need in default values.
@situchan kind bump 🙂 |
@VickyStash there's conflict |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
…omponent # Conflicts: # src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.tsx
@situchan conflicts are resolved, all yours! |
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.
We did not find an internal engineer to review this PR, trying to assign a random engineer to #31973 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
It looks like after merging main this PR started to cause lint and TS errors, I'm preparing a follow-up to resolve it! |
🚀 Cherry-picked to staging by https://github.com/francoisl in version: 1.4.33-5 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to staging by https://github.com/jasperhuangg in version: 1.4.34-0 🚀
|
🚀 Deployed to staging by https://github.com/jasperhuangg in version: 1.4.34-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.4.34-1 🚀
|
Details
[TS migration] Migrate 'ReportActionItemReportPreview.js' component to TypeScript
Fixed Issues
$ #31973
PROPOSAL: N/A
Tests
Make sure that the Money Request preview looks the same way as before.
Manual
Money requestManual
Money request to any user and go to the chat with that user.Scan
Money requestScan
Money request to any user.Receipt scan in progress...
textDistance
Money requestDistance
Money request to any workspace.Mixed Money request
Offline tests
N/A
QA Steps
Same as in the Tests section
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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.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
Android: Native
android1.mp4
Android: mWeb Chrome
android_web1.mp4
iOS: Native
ios1.mp4
iOS: mWeb Safari
ios_web1.mp4
MacOS: Chrome / Safari
web1.mp4
MacOS: Desktop
desktop1.mp4