[No QA] [TS migration] Migrate 'CustomStatusBar' component to TypeScript#29753
Conversation
| [SCREENS.SETTINGS.SECURITY]: colors.ice500, | ||
| [SCREENS.SETTINGS.STATUS]: colors.green700, | ||
| [SCREENS.SETTINGS.ROOT]: darkTheme.sidebar, | ||
| [SCREENS.SETTINGS.WALLET]: '', |
There was a problem hiding this comment.
I don't need that , thanks @VickyStash fixed
| if (currentRoute?.name && themeColors.PAGE_BACKGROUND_COLORS[currentRoute.name]) { | ||
| currentScreenBackgroundColor = themeColors.PAGE_BACKGROUND_COLORS[currentRoute.name]; | ||
| } |
There was a problem hiding this comment.
| if (currentRoute?.name && themeColors.PAGE_BACKGROUND_COLORS[currentRoute.name]) { | |
| currentScreenBackgroundColor = themeColors.PAGE_BACKGROUND_COLORS[currentRoute.name]; | |
| } | |
| if (currentRoute?.name && currentRoute.name in themeColors.PAGE_BACKGROUND_COLORS) { | |
| currentScreenBackgroundColor = themeColors.PAGE_BACKGROUND_COLORS[currentRoute.name as keyof typeof themeColors.PAGE_BACKGROUND_COLORS]; | |
| } |
| loungeAccessOverlay: colors.blue800, | ||
| mapAttributionText: colors.black, | ||
| PAGE_BACKGROUND_COLORS: {}, | ||
| PAGE_BACKGROUND_COLORS: {} as PageBackgroundColors, |
There was a problem hiding this comment.
How about moving colors into the object so satisfies ThemeBase works as expected?
| PAGE_BACKGROUND_COLORS: {} as PageBackgroundColors, | |
| PAGE_BACKGROUND_COLORS: { | |
| [SCREENS.HOME]: colors.darkAppBackground, | |
| [SCREENS.SAVE_THE_WORLD.ROOT]: colors.tangerine800, | |
| [SCREENS.SETTINGS.PREFERENCES]: colors.blue500, | |
| [SCREENS.SETTINGS.WORKSPACES]: colors.pink800, | |
| [SCREENS.SETTINGS.SECURITY]: colors.ice500, | |
| [SCREENS.SETTINGS.STATUS]: colors.green700, | |
| [SCREENS.SETTINGS.ROOT]: colors.darkAppBackground, | |
| }, |
There was a problem hiding this comment.
and same for light theme
There was a problem hiding this comment.
@kubabutkiewicz Actually you can wait for this PR to be merged first
…s-migration/CustomStatusBar/component
…s-migration/CustomStatusBar/component
…s-migration/CustomStatusBar/component
blazejkustra
left a comment
There was a problem hiding this comment.
Missing types.ts file @kubabutkiewicz
…s-migration/CustomStatusBar/component
…s-migration/CustomStatusBar/component
|
@blazejkustra kindy bump 😄 |
|
@MonilBhavsar 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] |
| (): React.ReactNode; | ||
| displayName?: string; |
There was a problem hiding this comment.
Sorry I didn't get it. Where are these properties used?
There was a problem hiding this comment.
Maybe this came from CustomStatusBar.displayName = 'CustomStatusBar'; but we don't really need to type this.
I don't see the need of this file as CustomStatusBar component doesn't have any props
There was a problem hiding this comment.
Exactly, I had similar thought
There was a problem hiding this comment.
This is due to guidelines , here is the reasoning.
There was a problem hiding this comment.
We don't have this pattern for any other TS components which have props.
Is it guideline not defining types of component itself if has props?
And defining types of component itself if no props?
There was a problem hiding this comment.
Okay, why displayName is an optional property?
There was a problem hiding this comment.
@MonilBhavsar adjusted, displayName is not optional now
There was a problem hiding this comment.
We don't have this pattern for any other TS components which have props.
Is it guideline not defining types of component itself if has props?
And defining types of component itself if no props?
I think we should add this to our guidelines in .md file
…s-migration/CustomStatusBar/component
MonilBhavsar
left a comment
There was a problem hiding this comment.
Looks good, thanks!
Reviewer Checklist
Screenshots/VideosAndroid: mWeb Chrome |
|
@kubabutkiewicz could you please merge main into this branch. Looks like android build is failing because of outdated branch |
|
Nevermind, it was an issue with my dev environment |
|
✋ 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.5-7 🚀
|





Details
Fixed Issues
$ #24977
Tests
Offline 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)/** comment above it */thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4