-
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 'ReportActionItemFragment.js' and related components to TypeScript #33958
[TS migration] Migrate 'ReportActionItemFragment.js' and related components to TypeScript #33958
Conversation
@@ -256,7 +256,7 @@ function ReportActionItemSingle({ | |||
<ReportActionItemFragment | |||
// eslint-disable-next-line react/no-array-index-key | |||
key={`person-${action.reportActionID}-${index}`} | |||
accountID={actorAccountID} | |||
accountID={actorAccountID ?? 0} | |||
fragment={fragment} |
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 inferred as Person type
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 think it's safe to change Person type to:
type Person = {
type: string;
style?: string;
text: string;
};
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.
Got a bunch of type error when type is chnaged, used this as workaround:
fragment={{...fragment, type: fragment.type ?? '', text: fragment.text ?? ''}}
@blazejkustra I Have some type checks failing, i would appreciate guidance! Thanks! |
I'll leave comments tomorrow morning as I'm finishing for today, sorry! |
@@ -256,7 +256,7 @@ function ReportActionItemSingle({ | |||
<ReportActionItemFragment | |||
// eslint-disable-next-line react/no-array-index-key | |||
key={`person-${action.reportActionID}-${index}`} | |||
accountID={actorAccountID} | |||
accountID={actorAccountID ?? 0} | |||
fragment={fragment} |
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 think it's safe to change Person type to:
type Person = {
type: string;
style?: string;
text: string;
};
Also a kind request, link issue in PR description and change PR title so it reflects issue title: [TS migration] Migrate 'X.js' component to TypeScript |
Thank you, @blazejkustra, for the suggestions. I appreciate your input, and I'll address them as soon as possible. I was occupied with personal errands all day today, so I apologize for the delayed response. |
@ishpaul777 Typecheck is failing |
bump 😄 |
FYI Lint is failing |
Thanks for callout.. it should be fixed now! |
@ishpaul777 Let's push it forward, we need a C+ on this |
@eVoloshchak is assigned c+ here but might be unavailable, i'll ping on slack channel |
Okay i think automation failed no c+ assigned |
Reassigned to @situchan as C+ |
@ishpaul777 you got some conflicts now |
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.
Looks pretty good, let's fix those conflicts!
@situchan A gentle bump to complete checklist so we can push it forward.. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop@ishpaul777 please merge main since 1k+ commits are behind |
Please sync this branch with the newest main. Context here, thanks! |
✋ 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/jasperhuangg in version: 1.4.33-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.4.33-5 🚀
|
Details
TS migration for ReportActionItemFragment.js
Fixed Issues
$ #31977
PROPOSAL: #31977 (comment)
Tests
Offline tests
QA Steps
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
VIDEO-2023-12-20-18-23-58.mp4
Android: mWeb Chrome
VIDEO-2023-12-19-19-05-08.mp4
iOS: Native
Screen.Recording.2024-01-09.at.8.52.56.PM-1.mov
iOS: mWeb Safari
RPReplay_Final1702992220.mov
MacOS: Chrome / Safari
Screen.Recording.2024-01-09.at.8.23.29.PM.mov
MacOS: Desktop
Screen.Recording.2024-01-11.at.12.05.01.AM-1.mov