Skip to content
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 2024-02-20] [$250] Text with single backtick code block is not rendered correctly #36348

Closed
6 tasks done
m-natarajan opened this issue Feb 12, 2024 · 22 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@m-natarajan
Copy link

m-natarajan commented Feb 12, 2024

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.40-0
Reproducible in staging?: y
Reproducible in production?: n
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: Applause internal team
Slack conversation:

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to any chat.
  3. Send a text with single backtick code block.

Expected Result:

The text with single backtick code block is rendered correctly.

Actual Result:

The text with single backtick code block appears with two boxes outside the text.

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

Add any screenshot/video evidence

Bug6376777_1707753717830.20240212_235003.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c1b63e23f853fcb5
  • Upwork Job ID: 1757081161711943680
  • Last Price Increase: 2024-02-13
  • Automatic offers:
    • ikevin127 | Contributor | 0
Issue OwnerCurrent Issue Owner: @Santhosh-Sellavel
@m-natarajan m-natarajan added DeployBlockerCash This issue or pull request should block deployment External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 12, 2024
@melvin-bot melvin-bot bot changed the title Text with single backtick code block is not rendered correctly [$500] Text with single backtick code block is not rendered correctly Feb 12, 2024
Copy link

melvin-bot bot commented Feb 12, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01c1b63e23f853fcb5

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 12, 2024
Copy link

melvin-bot bot commented Feb 12, 2024

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

Copy link

melvin-bot bot commented Feb 12, 2024

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Feb 12, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

Copy link

melvin-bot bot commented Feb 12, 2024

Triggered auto assignment to @aldo-expensify (Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@ikevin127
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue

The text with single backtick code block appears with two boxes outside the text.

What is the root cause of that problem?

Looks to have been caused by the TS migration from this PR #35462, specifically the following diff:

-            defaultRendererProps={defaultRendererProps}
+            defaultRendererProps={{...defaultRendererProps, style: style as TextStyle}}

defaultRendererProps={{...defaultRendererProps, style: style as TextStyle}}

The problem is that after migration we pass the entire style prop of the component instead of just passing the textStyle coming from const {boxModelStyle, otherStyle: textStyle} = splitBoxModelStyle(style) as we should considering that we type it as TextStyle.

What changes do you think we should make in order to solve the problem?

Only pass the textStyle to {...defaultRendererProps, style: style as TextStyle} instead of the entire styles object, like so:

    defaultRendererProps={{...defaultRendererProps, style: textStyle as TextStyle}}

Screenshots

MacOS: Chrome / Safari
Before After
Screenshot 2024-02-12 at 18 50 22 Screenshot 2024-02-12 at 18 51 20

@ShivCrew
Copy link

PROPOSAL

Please re-state the problem that we are trying to solve in this issue

The text with single backtick code block appears with two boxes outside the text. This is happening on all of the below platforms:

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

What is the root cause of that problem?
This is happening because 'backtick' is an essential part of most coding languages. Either when a backtick is typed with a text and passed to the backend code, or when the text with a backtick is printed on the screen, at any one or both of these instances, backtick is getting mixed with the code resulting in unexpected results. It's difficult to come up with a definite reason without debugging on all of the platforms.

What changes do you think we should make in order to solve the problem?
At the time, the text with backtick is passed on to the backend script, the backtick may be replaced by any other key. Similarly, when it is printed, this other key may be replaced by a backtick again.

Copy link

melvin-bot bot commented Feb 12, 2024

📣 @ShivCrew! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@ShivCrew
Copy link

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~018df9103ffcdb09b7?viewMode=1

Copy link

melvin-bot bot commented Feb 12, 2024

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Hourly KSv2 labels Feb 12, 2024
@aldo-expensify
Copy link
Contributor

Conversation about compensation: https://expensify.slack.com/archives/C01GTK53T8Q/p1707781846347169

@aldo-expensify
Copy link
Contributor

@kadiealexander I would like to suggest a $250 (half of $500) compensation for @ikevin127 since he helped by providing the correct RCA and pointing out the offending PR.

I'll remove @Santhosh-Sellavel since we didn't require a C+ review.

@aldo-expensify aldo-expensify removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 13, 2024
@aldo-expensify aldo-expensify changed the title [$500] Text with single backtick code block is not rendered correctly [$250] Text with single backtick code block is not rendered correctly Feb 13, 2024
Copy link

melvin-bot bot commented Feb 13, 2024

Upwork job price has been updated to $250

Copy link

melvin-bot bot commented Feb 13, 2024

📣 @ikevin127 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@Beamanator
Copy link
Contributor

@kavimuru @m-natarajan can someone please test #36360 on staging and confirm if this is resolved?

@ikevin127
Copy link
Contributor

@Beamanator Tested just now on latest staging (v1.4.40-2).

MacOS: Chrome
Screen.Recording.2024-02-13.at.13.29.29.mov

@Beamanator
Copy link
Contributor

Yes agreed, it looks like it's working well on staging macos & iOS!

@Beamanator Beamanator removed the DeployBlockerCash This issue or pull request should block deployment label Feb 13, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Feb 13, 2024
@melvin-bot melvin-bot bot changed the title [$250] Text with single backtick code block is not rendered correctly [HOLD for payment 2024-02-20] [$250] Text with single backtick code block is not rendered correctly Feb 13, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 13, 2024
Copy link

melvin-bot bot commented Feb 13, 2024

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

Copy link

melvin-bot bot commented Feb 13, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.40-5 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 2024-02-20. 🎊

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

Copy link

melvin-bot bot commented Feb 13, 2024

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:

  • [@aldo-expensify] The PR that introduced the bug has been identified. Link to the PR:
  • [@aldo-expensify] 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:
  • [@aldo-expensify] 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:
  • [@ikevin127] Determine if we should create a regression test for this bug.
  • [@ikevin127] 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.
  • [@kadiealexander] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@ikevin127
Copy link
Contributor

  • [@ikevin127] Determine if we should create a regression test for this bug.
  • [@ikevin127] 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.

No need for regression tests here as this was caused by TS migration #35462 which was meant to only convert JS to TS, not change existing logic. More context here.

@kadiealexander
Copy link
Contributor

@ikevin127 is paid!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants