[CP Stag] Fix inline code font size in composer#39516
[CP Stag] Fix inline code font size in composer#39516thienlnam merged 2 commits intoExpensify:mainfrom
Conversation
|
@shubham1206agra 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] |
| }, | ||
| pre: { | ||
| fontFamily: FontUtils.fontFamily.platform.MONOSPACE, | ||
| fontSize: 13, |
There was a problem hiding this comment.
I've copied 13 from here:
Lines 185 to 193 in 7177173
Perhaps we should expose it as variables.preFontSize?
| }, | ||
| code: { | ||
| fontFamily: FontUtils.fontFamily.platform.MONOSPACE, | ||
| fontSize: 13, // TODO: should be 15 if inside h1, see StyleUtils.getCodeFontSize |
There was a problem hiding this comment.
Currently, react-native-live-markdown supports only one fixed value for font size for each individual Markdown syntax style. However, the actual font size depends on whether the inline code is inside h1 or not:
Lines 595 to 600 in 7177173
I suggest that we use 13 for now as we need more time to implement it properly on Live Markdown side.
Here's how it looks with 13:
There was a problem hiding this comment.
@thienlnam What do you think? Can we skip this edge case as for now?
There was a problem hiding this comment.
Yeah this seems fine to skip
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
Reviewer Checklist
Screenshots/Videos |
|
@thienlnam Please review and merge here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…line-code-font-size Fix inline code font size in composer (cherry picked from commit 0967e60)
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.60-13 🚀
|






Details
This PR unifies the font size of codeblock and inline code between chat history and composer box by setting the correct font size in composer box (Live Markdown Preview feature).
cc @thienlnam
Android:

iOS:

Web:

Fixed Issues
$ #39458
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.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 and/or tagged@Expensify/designso 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