[TS migration] Migrate 'ConfirmContent.js' component to TypeScript#31699
[TS migration] Migrate 'ConfirmContent.js' component to TypeScript#31699mountiny merged 12 commits intoExpensify:mainfrom
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. |
rezkiy37
left a comment
There was a problem hiding this comment.
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.
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.
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.
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.
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.
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.
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 |
|
✋ 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 Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.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