[TS Migration] Migrate FlagCommentPage#34734
Conversation
There was a problem hiding this comment.
I think you will also need to update WithReportAndReportActionOrNotFoundProps type
| type FlagCommentPageProps = WithReportAndReportActionOrNotFoundProps & FlagCommentPageWithOnyxProps; | |
| type FlagCommentRouteProp = RouteProp<{params: {reportID: string; reportActionID: string}}>; | |
| type FlagCommentPageNavigationProps = StackScreenProps<FlagCommentNavigatorParamList, typeof SCREENS.FLAG_COMMENT_ROOT>; | |
| type FlagCommentPageProps = WithReportAndReportActionOrNotFoundProps & FlagCommentPageWithOnyxProps & FlagCommentPageNavigationProps; |
There was a problem hiding this comment.
| function getReportID(route: FlagCommentRouteProp) { | |
| function getReportID(route: FlagCommentPageNavigationProps['route']) { |
There was a problem hiding this comment.
| reportAction = parentReportActions?.[report?.parentReportActionID ?? ''] ?? undefined; | |
| reportAction = parentReportActions?.[report?.parentReportActionID ?? '']; |
There was a problem hiding this comment.
Create a type for ValueOf<typeof CONST.MODERATION>
There was a problem hiding this comment.
| const parentReportAction = parentReportActions?.[report?.parentReportActionID ?? ''] ?? undefined; | |
| const parentReportAction = parentReportActions?.[report?.parentReportActionID ?? '']; |
There was a problem hiding this comment.
You can get rid of that changes making getActionToFlag return null instead of undefined
|
@rushatgabhane 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] |
5da20fc to
fbef230
Compare
Reviewer Checklist
Screenshots/VideosiOS: NativeScreen.Recording.2024-02-07.at.01.39.38.movMacOS: Chrome / SafariScreen.Recording.2024-02-07.at.01.28.57.movMacOS: DesktopScreen.Recording.2024-02-07.at.01.32.09.mov |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #25184 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
✋ 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/danieldoglas in version: 1.4.39-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.39-8 🚀
|



Details
[TS migration] Migrate FlagCommentPage to TypeScript
Fixed Issues
$ #25184
PROPOSAL: N/A
Tests
Test FlagCommentPage:
Offline tests
N/A
QA Steps
Same as in the Tests section.
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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop