[TS migration] Migrate 'InlineCodeBlock' component to TypeScript#32477
Conversation
kubabutkiewicz
left a comment
There was a problem hiding this comment.
one nit besides lgtm :D
rezkiy37
left a comment
There was a problem hiding this comment.
Left a comment, after LGTM.
|
|
||
| const textMatrix = getTextMatrix(children); | ||
|
|
||
| return textMatrix.map((rowText, rowIndex) => ( |
There was a problem hiding this comment.
I see you removed the outer fragment <></> and are returning the map directly, please let's test this to ensure there is no regressions.
There was a problem hiding this comment.
Retested all of the platforms 👌
|
|
||
| type CodeWordWrapperStyles = ViewStyle; | ||
| type CodeWordStyles = TextStyle; | ||
| type CodeWordStyles = ViewStyle; |
There was a problem hiding this comment.
@blazejkustra Otherwise there is a TS error in this line

There was a problem hiding this comment.
Weird typing issues, I'm not sure I get them...
There was a problem hiding this comment.
@cubuspl42 More detailed clarification, let me know if it makes more sense to you:
CodeWordStylestype is used for typingstyles.codeWordStylestyles.codeWordStyleis passed to theWrappedTextcomponent as a part ofwordStylesparamwordStylesparam inWrappedTextis used forViewcomponent styling- so it expects that
styles.codeWordStylewill haveViewStyletype instead ofTextStyle, which meansCodeWordStylestype should beViewStyle
There was a problem hiding this comment.
Ok, thanks. So I understand that we don't pass any text-specific styles, and we stick to the View-supported style properties subset
|
@cubuspl42 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] |
jakub-trzebiatowski
left a comment
There was a problem hiding this comment.
If we move or refactor the code, we are responsible for ensuring this code meets the checklist requirements (correct English, proper JSDoc comments, etc.).
|
@cubuspl42 Thank you! Updated |
|
Please merge |
Reviewer Checklist
Screenshots/VideosDesktop |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #25092 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
marcochavezf
left a comment
There was a problem hiding this comment.
LGTM, thank you guys!
|
✋ 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/marcochavezf in version: 1.4.12-0 🚀
|
|
🚀 Deployed to staging by https://github.com/marcochavezf in version: 1.4.12-0 🚀
|
|
🚀 Deployed to staging by https://github.com/marcochavezf in version: 1.4.12-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.12-2 🚀
|





Details
[TS migration] Migrate 'InlineCodeBlock' component to TypeScript
Fixed Issues
$ #25092
PROPOSAL: N/A
Tests
Helloand make sure it displays same way as before.Backtick code block input example
Offline tests
N/A
QA Steps
Helloand make sure it displays same way as before.Backtick code block input example
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)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