-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[PAID] [$500] Chat - Font size is smaller in single backtick code block #35746
Comments
Job added to Upwork: https://www.upwork.com/jobs/~01e903c4ce4d32d16f |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane ( |
Triggered auto assignment to @strepanier03 ( |
We think that this bug might be related to #vip-vsp |
ProposalPlease re-state the problem that we are trying to solve in this issue.Chat - Font size is smaller in single backtick code block What is the root cause of that problem?We are overriding the fontSize inside What changes do you think we should make in order to solve the problem?We remove the fontSize from ResultAlternativeMake the font size for inline coed a bit larger. Use Or if we want to increase the size when the code block is inside h1 we can modify the function below: function getCodeFontSize(isInsideH1: boolean) {
return isInsideH1 ? getValueUsingPixelRatio(17, 19) : getValueUsingPixelRatio(15, 21);
} Alternative 2Update the fontSize and for pre code block as suggested by the design team. Lines 180 to 188 in 0eb6d02
|
ProposalPlease re-state the problem that we are trying to solve in this issueThe single backtick code block does not have the same font size as the triple backtick. What is the root cause of that problem?The issue comes from the function getCodeFontSize(isInsideH1: boolean) {
return isInsideH1 ? 15 : 13;
} This logic gives our regular single backtick code block the smaller fontSize 13 while code blocks wrapped in an h1 element will have fontSize 15 which is the same as the regular triple backtick code block has currently. What changes do you think we should make in order to solve the problem?Given this issue's expected result, this means that the logic added by the mentioned PR does not apply anymore and returning fontSize 13 for the non-h1-wrapped code block is not valid anymore:
With this change -> both regular single backtick code block and the h1 wrapped single backtick code block will have ScreenshotsWhat alternative solutions did you explore? (Optional)If the expected result is what we want here but we need to keep the redundant logic added by the mentioned PR (for whatever reason) then within the const textStyleOverride = {
...(isInsideH1 && fontSize),
// ...rest of the variables this will have our regular single backtick code block default to the normal fontSize 15 instead of being set to 13 - while keeping the Additional improvement in case we go w/ this solution: within the ScreenshotsWhat alternative solutions did you explore? (Optional)As per design team discussion below:
Any other small changes can be adjusted during the PR - depending on where the design team discussion lands. |
cc @Expensify/design |
Ah yes, just noticed this one the other day! @shawnborton which size in your opinion is the correct size for these? I prefer the smaller size of the inline code (13px). While I know technically our regular text size is 15px, the mono font at that size feels bigger than the regular text. |
Totally agree, optically it feels like 13px in our mono font matches 15px of our regular font. |
I think the main idea here is that:
|
Current size is 13px and inside a H1 it is 15. |
Okay cool, that logic could probably remain but we should make the normal code blocks use 13px as well then. |
Can you share screenshots with more context? Like full app screenshots that include other chat messages too? It's a bit hard to judge this in such isolation. Thanks! |
☝️ I think that looks good, but agree with Shawn, it'd be nice to see it with a bit more context. |
Do you mean margin or padding? I bet Danny might have a similar comment but... what if we used 4 instead of 6 for the vertical and horizontal padding of the code block? This way we get our favorite number 4 instead of 6. |
Sounds good to me, let's go with that. Thanks! |
@sobitneupane, can you look at the discussion above 🙏🏻 |
@strepanier03, @sobitneupane Whoops! This issue is 2 days overdue. Let's get this updated quick! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Thanks for the proposal everyone. Alternative 2 Proposal (with the changes decided by design team) from @Krishna2323 looks good to me. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @bondydaa, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @Krishna2323 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@sobitneupane PR ready for review :) |
@strepanier03 friendly bump for payments here :), PR was deployed to production on 29th Feb. |
@strepanier03 bump for payments process 🙇🏻 |
@strepanier03, can you pls process the payments 🙏🏻 |
@strepanier03 This is ready for payment. PR deployed to production on 29th Feb. |
Sorry everyone, the automation failed here and the urgency label wasn't updated so this fell through the cracks. I'm working on this now and will have an update in a few minutes. |
Payment Summary
@JmillsExpensify - Payment request incoming from @sobitneupane |
@Krishna2323 - I've paid you via Upwork and close your contract, thank you again! @sobitneupane - The payment summary is above for your payment request and I've assigned Jason as well. Cheers! |
$500 approved for @sobitneupane |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.36.0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4278628
**Email or phone of affected tester (no customers):**[email protected]
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Pre-condition: user must be logged in
text
" and send ittext
" and send itExpected Result:
The single backtick code block should have the same font size as the triple backtick
Actual Result:
The single backtick code block does not have the same font size as the triple backtick
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6365462_1706918418825.bandicam_2024-02-02_13-11-54-768.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: