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-03-06] [$250] Strikethrough line is white on links and emails #36349

Closed
3 of 6 tasks
m-natarajan opened this issue Feb 12, 2024 · 31 comments
Closed
3 of 6 tasks
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. Log in to New Expensify
  2. Nagivate to any chat
  3. Send any email or link with strikethrough markdown

Expected Result:

Strikethrough line should match the color of links and emails.

Actual Result:

Strikethrough line is white.

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

Bug6376813_1707754899905.2024-02-12_17-20-25.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0190109e65c0e5c4d0
  • Upwork Job ID: 1757082391060185088
  • Last Price Increase: 2024-02-12
  • Automatic offers:
    • mollfpr | Contributor | 0
    • mkhutornyi | Contributor | 0
@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 Strikethrough line is white on links and emails [$500] Strikethrough line is white on links and emails Feb 12, 2024
Copy link

melvin-bot bot commented Feb 12, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0190109e65c0e5c4d0

@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 - @ntdiary (External)

Copy link

melvin-bot bot commented Feb 12, 2024

Triggered auto assignment to @garrettmknight (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 @francoisl (Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@francoisl
Copy link
Contributor

Can reproduce, but no need to block on this, I'll demote. Also going to update the price as it's most likely a simple change.

@francoisl francoisl removed the DeployBlockerCash This issue or pull request should block deployment label Feb 12, 2024
@francoisl francoisl changed the title [$500] Strikethrough line is white on links and emails [$250] Strikethrough line is white on links and emails Feb 12, 2024
Copy link

melvin-bot bot commented Feb 12, 2024

Upwork job price has been updated to $250

@Krishna2323
Copy link
Contributor

Krishna2323 commented Feb 12, 2024

Proposal

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

Strikethrough line is white on links and emails

What is the root cause of that problem?

We already have text-decoration styles applied to a tag, so the styles from the del tag isn't applied correctly because the text-decoration-color: rgb(90, 176, 255);.

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

To apply both underline & line-through we need to wrap the TNodeChildrenRenderer with Text which will apply the styles for the line-through .

Steps:

  1. Create a new HTML engine util function named isChildOfDel which will identify if the anchor is inside del tag or not.
function isChildOfDel(tnode: TNode): boolean {
    return isChildOfNode(tnode, (node) => node.domNode?.name !== undefined && node.domNode.name.toLowerCase() === 'del');
}
  1. Check if the anchor is inside del tag or not.
const isInsideDel = HTMLEngineUtils.isChildOfDel(tnode);
  1. Wrap the TNodeChildrenRenderer with Text with correct textDecorationLine style, we also need to flatten style from prop.const flattenStyles = StyleSheet.flatten(style as TextStyle);
<Text style={[flattenStyles, {textDecorationLine: isInsideDel ? 'line-through' : undefined}]}>
    <TNodeChildrenRenderer tnode={tnode} />
</Text>

Result

strikeThroughColor.mp4

Alternative

Or we can only show the line-through by overriding the styles if it is inside del .

style={[parentStyle, styles.textUnderlinePositionUnder, styles.textDecorationSkipInkNone, style, isInsideDel && {textDecorationLine: 'line-through'}]}

@Krishna2323
Copy link
Contributor

@francoisl, can you pls increase the bounty🙏🏻, this isn't a simple change, It took me good amount of time to figure out the root cause and to find a solution. Even if my solution is not valid then also I think we can't find a simple change.

@situchan
Copy link
Contributor

@Krishna2323 this was deploy blocker. Are you able to find offending PR?
I suspect this came from expensify-common while working on live markdown regression fixes

@Krishna2323
Copy link
Contributor

No, I couldn't find the offending PR.

@mkhutornyi
Copy link
Contributor

Proposal

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

Strikethrough line is white on links and emails

What is the root cause of that problem?

regression from this line:
https://github.com/Expensify/App/pull/35462/files#diff-4935ec01feca8054d8a080f44501a37a1cf1398ffd19e0b46d3551a56e5ba313R66

- style={{...props.style, ...parentStyle, ...styles.textUnderlinePositionUnder, ...styles.textDecorationSkipInkNone}}
+ style={[parentStyle, styles.textUnderlinePositionUnder, styles.textDecorationSkipInkNone, style]}

So style overrides other custom styles by putting at the end

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

fix that order so put style at the beginning as before

style={[style, parentStyle, styles.textUnderlinePositionUnder, styles.textDecorationSkipInkNone]}

@Krishna2323
Copy link
Contributor

Krishna2323 commented Feb 13, 2024

I think we can't find a simple change

Lol 😂, I thought we need both, underline & strike-through at the same time.

@jjcoffee
Copy link
Contributor

@garrettmknight FYI @ntdiary is OOO until 18th Feb, I can take this one to keep things moving if you want 🙇

@situchan
Copy link
Contributor

I think @mollfpr should handle this as he reviewed offending PR

Copy link

melvin-bot bot commented Feb 14, 2024

📣 @mkhutornyi 🎉 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 📖

@melvin-bot melvin-bot bot added the Overdue label Feb 15, 2024
@mollfpr
Copy link
Contributor

mollfpr commented Feb 15, 2024

@mkhutornyi Let me know when the PR is ready, thank you!

@mkhutornyi
Copy link
Contributor

PR will be ready by end of week

@francoisl
Copy link
Contributor

(Commenting to remove the Overdue label, see comment just above about the PR)

Copy link

melvin-bot bot commented Feb 27, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@garrettmknight garrettmknight added the Awaiting Payment Auto-added when associated PR is deployed to production label Feb 29, 2024
@mollfpr
Copy link
Contributor

mollfpr commented Mar 1, 2024

@garrettmknight Could you add the payment date? The blocker issue is closed, so there's no regression on the PR (for now).

@garrettmknight garrettmknight removed the Reviewing Has a PR in review label Mar 1, 2024
@garrettmknight garrettmknight changed the title [$250] Strikethrough line is white on links and emails [HOLD for payment 2024-03-06] [$250] Strikethrough line is white on links and emails Mar 1, 2024
@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Mar 6, 2024
@garrettmknight
Copy link
Contributor

garrettmknight commented Mar 6, 2024

Payment Summary

@melvin-bot melvin-bot bot removed the Overdue label Mar 6, 2024
@mollfpr
Copy link
Contributor

mollfpr commented Mar 7, 2024

@garrettmknight Requested in NewDot! I'll complete the checklist soon.

@garrettmknight garrettmknight added Weekly KSv2 and removed Daily KSv2 labels Mar 8, 2024
@garrettmknight
Copy link
Contributor

Cool, dropping to weekly.

@mollfpr
Copy link
Contributor

mollfpr commented Mar 9, 2024

[@mollfpr] The PR that introduced the bug has been identified. Link to the PR:

#35462

[@mollfpr] 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:

https://github.com/Expensify/App/pull/35462/files#r1518590135

[@mollfpr] 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:

I think the regression step should be good and we also have a checklist to check the generic component.

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

We can a case for strikethrough an link/email and verify the strikethrough color match the link color. https://expensify.testrail.io/index.php?/cases/view/2950395

@garrettmknight
Copy link
Contributor

TestRail update in - just up to you to submit for payment now!

@JmillsExpensify
Copy link

$250 approved for @mollfpr based on summary.

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

10 participants