-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 'InlineCodeBlock' component to TypeScript #32477
[TS migration] Migrate 'InlineCodeBlock' component to TypeScript #32477
Conversation
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.
one nit besides lgtm :D
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 comment, after LGTM.
|
||
const textMatrix = getTextMatrix(children); | ||
|
||
return textMatrix.map((rowText, rowIndex) => ( |
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Retested all of the platforms 👌
@@ -1,7 +1,7 @@ | |||
import {TextStyle, ViewStyle} from 'react-native'; | |||
|
|||
type CodeWordWrapperStyles = ViewStyle; | |||
type CodeWordStyles = TextStyle; | |||
type CodeWordStyles = ViewStyle; |
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.
Why was this changed?
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.
@blazejkustra Otherwise there is a TS error in this line
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.
Weird typing issues, I'm not sure I get them...
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.
@cubuspl42 More detailed clarification, let me know if it makes more sense to you:
CodeWordStyles
type is used for typingstyles.codeWordStyle
styles.codeWordStyle
is passed to theWrappedText
component as a part ofwordStyles
paramwordStyles
param inWrappedText
is used forView
component styling- so it expects that
styles.codeWordStyle
will haveViewStyle
type instead ofTextStyle
, which meansCodeWordStyles
type should beViewStyle
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.
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] |
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.
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 |
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.
Looks good
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! |
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.
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
Hello
and make sure it displays same way as before.Backtick code block input example
Offline tests
N/A
QA Steps
Hello
and make sure it displays same way as before.Backtick code block input example
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)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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop