-
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
[HOLD for payment 2023-11-17] [$500] No text size change on bold on single backtick code block #30203
Comments
Job added to Upwork: https://www.upwork.com/jobs/~015b5dbaab7f1156a1 |
Triggered auto assignment to @laurenreidexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.The issue we're addressing is that when a user sends a message with a code block in bold text, the app still displays it with the normal font size. What is the root cause of that problem?This problem stems from how bold messages are saved as HTML code with an What changes do you think we should make in order to solve the problem?To solve this problem, we need to modify the code rendering logic ( //if code is child of h1, change font-size with 14.5, if not use default font size for code
const fontSize = props.tnode.parent.tagName === 'h1' ?
14.5 : textStyle.fontSize;
const textStyleOverride = {
fontFamily: font,
fontWeight: undefined,
fontStyle: undefined,
fontSize: fontSize,
}; What alternative solutions did you explore? (Optional)N/A MacOS: Chrome / Safarieee6b3b3-ca5b-48a2-a051-286214db386e.mp4 |
@yakupafsin Thanks for the proposal. But you are fixing the wrong bug here. What we are looking is to have the heading message always rendered with fontSizeLarge. i.e.
should be rendered with fontSizeLarge (already working)
should be rendered with fontSizeLarge as well but it's not (bug is here) |
Hi, sorry. I guess it was too late I made a mistake. But I've edited my proposal and it's aiming the right problem now. |
Do I have to send it again, or just editing enough? |
@yakupafsin Thanks for the update. I don't think we can just omit the font size. This will make code tag text render at size 15px which does not seem intended.
Editing is enough |
@s77rt, I have revised my solution. This time, it only changes the font size if the element is a child of an |
@yakupafsin Thanks for update. The use of size 13px for code tags is intended to keep the outer height consist with the rest of the text. Similarly for code tags under h1, we don't want to apply 17px but 14.5px. Can you please update your proposal based on that? cc @shawnborton To 👀 the below changes (changed font size of code tag if it's inside a heading message from 13px to 14.5px) |
@s77rt Because on previous comment you mentioned that
That's why I've used that. But we can change values accordingly. |
How did we arrive at 14.5? I am not a fan of using a half-pixel font size here. If anything, can we use 15px since we use that font size elsewhere? cc @Expensify/design for visibility here |
@shawnborton yes I can change it with 15. Or I can just use the one of the values from style page. Whatever best for the app. |
15 should be the default font size of the app, so I like just grabbing that for the size var. |
it is shouldn't be fixed with hard coding directly using 15px though it could be actually used |
@shawnborton 14.5px is 85% of 17px (from h1). Based on the use of 13px, 85% of 15px (in normal text). I think we also need to adjust the line height for h1. The code tags are very close to each other. |
@s77rt In the same proposal, we can include this change and handle it with a single pull request (PR). I suggest taking the font size of the h1 element and applying 85% of that size to the code tag, as shown in the code snippet below: 'fontSize = h1FontSize/100*85' Please note that this is just an example, and the actual code may differ. |
Understood, but I still would prefer 15 so we don't need to manage another font size. |
Got it. Thanks! @yakupafsin Let's get this fixed 🚀 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @roryabraham, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
I know I am late Not taking the proposal textStyle applied to both are the same ... which came from the backend |
@roryabraham Thank you for reviewing the proposal. I've sent my proposal on UpWork. Do I have to wait until I've been hired for the project, or can I send my PR straight away? |
@yakupafsin You can raise the PR now. You will be hired on Upwork only for the payment (everything else is done in Github / Slack) |
PR merged |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.97-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-11-17. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Regression Test Proposal
|
Automation failed here - issuing payments now |
Payment Summary:
|
Final Step: Issue payment to @yakupafsin in Upwork once they accept request |
@laurenreidexpensify offer accepted, Thank you. |
Payment Summary: C+ - @s77rt $500 - payment issued in Upwork |
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.3.89.6
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1698062570837299
Action Performed:
Hello
and observe its font sizeHello
and observe its font size, it is bold but font size is same as normal single backtick textExpected Result:
App should increase text size on bold (using #) of single backtick code block as it does for normal text
Actual Result:
App keeps same text size on bold (using #) of single backtick code block as normal text size of single backtick code block
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
windows.chrome.no.bold.text.single.backtick.mp4
MacOS: Desktop
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @laurenreidexpensifyThe text was updated successfully, but these errors were encountered: