Skip to content

[HOLD for payment 2023-11-17] [$500] No text size change on bold on single backtick code block #30203

Closed

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com 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:

  1. Open the app
  2. Open any report
  3. Send normal message, observe font-size for sent message
  4. Send bold message (add # in beginning) and observe font-size for sent message, it will be bigger then normal message
  5. Send normal single backtick code block eg: Hello and observe its font size
  6. Send bold single backtick code block eg: # Hello and observe its font size, it is bold but font size is same as normal single backtick text

Expected 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?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Android: Native

android native no bold text issue

Android: mWeb Chrome

android chrome no bold text issue

iOS: Native

ios native text size issue

iOS: mWeb Safari

ios safari text size issue

MacOS: Chrome / Safari

mac chrome text size issue

windows.chrome.no.bold.text.single.backtick.mp4
MacOS: Desktop

mac desktop text size issue

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015b5dbaab7f1156a1
  • Upwork Job ID: 1716547328191115264
  • Last Price Increase: 2023-10-23
  • Automatic offers:
    • s77rt | Reviewer | 27506802
    • dhanashree-sawant | Reporter | 27506803
Issue OwnerCurrent Issue Owner: @laurenreidexpensify

Activity

  1. added
    External
    Daily
    Bug
    on Oct 23, 2023
  2. changed the title [-]No text size change on bold on single backtick code block[/-] [+][$500] No text size change on bold on single backtick code block[/+] on Oct 23, 2023
  3. melvin-bot commented on Oct 23, 2023

    @melvin-bot
  4. melvin-bot commented on Oct 23, 2023

    @melvin-bot

    Triggered auto assignment to @laurenreidexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  5. added
    Help Wanted
    on Oct 23, 2023
  6. melvin-bot commented on Oct 23, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  7. melvin-bot commented on Oct 23, 2023

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (External)

  8. yakupafsin commented on Oct 23, 2023

    @yakupafsin
    Contributor

    Proposal

    Please 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 <h1> tag, which has a specific font size defined in the style file. However, when a code block is added with bold text, it uses a <code> tag as a child element of <h1>, and the code block's font size takes precedence over the <h1> tag's font size, causing the issue.

    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 (CodeRenderer.js). We should check if the <code> element is a child of an <h1> tag. If it is, we should change <code> tag font-size with 14.5px . Here's an example of the code to achieve this:

    //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 / Safari
    eee6b3b3-ca5b-48a2-a051-286214db386e.mp4
  9. s77rt commented on Oct 24, 2023

    @s77rt
    Member

    @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.

    # msg
    

    should be rendered with fontSizeLarge (already working)

    # `msg`
    

    should be rendered with fontSizeLarge as well but it's not (bug is here)

  10. yakupafsin commented on Oct 24, 2023

    @yakupafsin
    Contributor

    @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.

    # msg
    

    should be rendered with fontSizeLarge (already working)

    # `msg`
    

    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.

  11. yakupafsin commented on Oct 24, 2023

    @yakupafsin
    Contributor

    @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.

    # msg
    

    should be rendered with fontSizeLarge (already working)

    # `msg`
    

    should be rendered with fontSizeLarge as well but it's not (bug is here)

    Do I have to send it again, or just editing enough?

  12. 47 remaining items

  13. removed
    Reviewing
    on Nov 10, 2023
  14. melvin-bot commented on Nov 10, 2023

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  15. melvin-bot commented on Nov 10, 2023

    @melvin-bot

    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.

    • External issue reporter
    • Contributor that fixed the issue
    • Contributor+ that helped on the issue and/or PR

    For reference, here are some details about the assignees on this issue:

  16. melvin-bot commented on Nov 10, 2023

    @melvin-bot

    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:

    • [@s77rt] The PR that introduced the bug has been identified. Link to the PR:
    • [@s77rt] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
    • [@s77rt] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
    • [@s77rt] Determine if we should create a regression test for this bug.
    • [@s77rt] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@laurenreidexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  17. s77rt commented on Nov 11, 2023

    @s77rt
    Member

    Regression Test Proposal

    1. Open any report
    2. Send a normal message e.g. Hello Expensifiers
    3. Send a heading message (add # in beginning) e.g. # Hello Expensifiers
    4. Verify that the font size of the heading message is bigger than that of the normal message
    5. Send a normal single backtick code block e.g. Hello Expensifiers
    6. Send a heading single backtick code block e.g. # Hello Expensifiers
    7. Verify that the font size of the heading message is bigger than that of the normal message
  18. laurenreidexpensify commented on Nov 20, 2023

    @laurenreidexpensify
    Contributor

    Automation failed here - issuing payments now

  19. laurenreidexpensify commented on Nov 20, 2023

    @laurenreidexpensify
    Contributor

    Payment Summary:

    • C+ - @s77rt $500 - payment issued in Upwork
    • Contributor - $500 - @yakupafsin requires payment in Upwork - please accept job
    • Bug Report - $50 @dhanashree-sawant payment issued in Upwork
  20. laurenreidexpensify commented on Nov 20, 2023

    @laurenreidexpensify
    Contributor

    Final Step: Issue payment to @yakupafsin in Upwork once they accept request

  21. yakupafsin commented on Nov 20, 2023

    @yakupafsin
    Contributor

    @laurenreidexpensify offer accepted, Thank you.

  22. laurenreidexpensify commented on Nov 21, 2023

    @laurenreidexpensify
    Contributor

    Payment Summary:

    C+ - @s77rt $500 - payment issued in Upwork
    Contributor - $500 - @yakupafsin requires payment issued in Upwork
    Bug Report - $50 @dhanashree-sawant payment issued in Upwork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions