-
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
[TS migration] Migrate 'ConfirmContent.js' component to TypeScript #31699
[TS migration] Migrate 'ConfirmContent.js' component to TypeScript #31699
Conversation
@robertKozik 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] |
Blocked by #25098 |
@fvlvte You can start working on this 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.
Left a couple minor comments, after LGTM.
src/components/ConfirmContent.tsx
Outdated
/** A callback to call when the form has been submitted */ | ||
onConfirm: (...args: unknown[]) => void; | ||
|
||
/** A callback to call when the form has been closed */ | ||
onCancel: (...args: unknown[]) => void; |
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.
Maybe it's possible to define specific props instead of using unknown
?
src/components/ConfirmContent.tsx
Outdated
titleStyles = [], | ||
promptStyles = [], | ||
contentStyles = [], | ||
iconAdditionalStyles = [], |
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.
No need in default values for styles
titleStyles = [], | |
promptStyles = [], | |
contentStyles = [], | |
iconAdditionalStyles = [], | |
titleStyles, | |
promptStyles, | |
contentStyles, | |
iconAdditionalStyles, |
src/components/ConfirmContent.tsx
Outdated
shouldShowCancelButton: boolean; | ||
|
||
/** Icon to display above the title */ | ||
iconSource: null | string | ((props: unknown) => ReactNode); |
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 haven't found specific case where iconSource being passed to this component, could you confirm if there is a case where iconSource
is used
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.
It's not used anywhere but I think TS migration is not a place for feature removing - what do You think @fabioh8010?
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'm not sure if we should remove to be honest.. it was added 4 months ago, looks still "fresh". @grgia I saw that your commit added this support for icon along with other thing, but this prop is not being used anymore. Do you know if we can remove the prop alongside with the logic to show the icon? Thanks!
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.
Since we got no response, @fvlvte let's keep it and proceed with this PR. Please let me know when the PR is ready to be re-reviewed again!
@fvlvte LGTM 👍 |
@fvlvte Please resolve conflicts and tag us again for review |
# Conflicts: # src/components/ConfirmContent.js
Resolved @fabioh8010 @pac-guerreiro |
# Conflicts: # src/components/Icon/index.tsx
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
d895b7b
to
81a25c8
Compare
# Conflicts: # src/components/ConfirmContent.js # src/components/Icon/index.tsx
81a25c8
to
9d85314
Compare
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2023-12-27.at.6.16.38.PM.movAndroid: mWeb ChromeiOS: NativeScreen.Recording.2023-12-27.at.5.40.21.PM.moviOS: mWeb SafariScreen.Recording.2023-12-27.at.5.41.32.PM.movMacOS: Chrome / SafariScreen.Recording.2023-12-27.at.5.14.39.PM.movMacOS: DesktopScreen.Recording.2023-12-27.at.5.29.18.PM.mov |
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 everyone!
✋ 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/mountiny in version: 1.4.18-8 🚀
|
Details
Migrated ConfirmContent component to TypeScript.
Fixed Issues
$ #25047
PROPOSAL: N/A
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
android-native.mov
Android: mWeb Chrome
android-web.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-safari.mov
MacOS: Chrome / Safari
macos-web.mov
MacOS: Desktop
macos-desktop.mov