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

[$1000] Inconsistent codeblock parsing that allowing codeblock to be styled #18556

Closed
1 of 6 tasks
kavimuru opened this issue May 7, 2023 · 15 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@kavimuru
Copy link

kavimuru commented May 7, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Open staging.new.expensify.com
  2. Send this message to a chat : Strikethrough codeblock
  3. Send this message to a chat : Italic codeblock
  4. Examine the difference of the parsing

Expected Result :

Either both message parsed appropriately (italic codeblock being italicized, strikethrough codeblock have strikethrough), or both message's styling shouldn't be parsed because codeblock shouldn't be styled

Actual Result :

The italic codeblock isn't italicized, but strikethrough codeblock have strikethrough

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.11.2
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
Notes/Photos/Videos: Any additional supporting documentation
1

Strikethrough.Codeblock.mp4

Expensify/Expensify Issue URL:
Issue reported by: @kerupuksambel
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1683378715811639

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0131f6c3fd981b25bb
  • Upwork Job ID: 1655867220595605504
  • Last Price Increase: 2023-05-09
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 7, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 7, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 7, 2023

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

@dukenv0307
Copy link
Contributor

dukenv0307 commented May 8, 2023

Proposal

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

Inconsistent codeblock parsing that allowing codeblock to be styled

What is the root cause of that problem?

Inconsistent rule replacement between italic and strikethrough in expensify-common lib

The rule replacement of italic in here is only wrapped inside with em tag if it doesn't pre tag. The same rule with bold.

replacement: (match, g1) => (g1.includes('<pre>') ? match : `<em>${g1}</em>`),

While the rule replacement of strikethrough in here is always wrapped inside with del tag

replacement: '<del>$1</del>',

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

Change the rule replacement of strikethrough to be the same as italic since codeblock shouldn't be styled.

What alternative solutions did you explore? (Optional)

If we somehow prefer the rule replacement of strikethrough, we can change rule of italic to be the same as strikethrough. But I still prefer that codeblock shouldn't be styled by either italic, bold, or strikethrough.

@bfitzexpensify
Copy link
Contributor

Reproduced

@bfitzexpensify bfitzexpensify added the External Added to denote the issue can be worked on by a contributor label May 9, 2023
@melvin-bot melvin-bot bot changed the title Inconsistent codeblock parsing that allowing codeblock to be styled [$1000] Inconsistent codeblock parsing that allowing codeblock to be styled May 9, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 9, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0131f6c3fd981b25bb

@melvin-bot
Copy link

melvin-bot bot commented May 9, 2023

Current assignee @bfitzexpensify is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented May 9, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 9, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 9, 2023

Triggered auto assignment to @francoisl (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@fedirjh
Copy link
Contributor

fedirjh commented May 9, 2023

It appears that this may have been a case that should have been handled in PR #16437 . I am not sure if it was intentionally skipped .

cc @situchan @aimane-chnaif do you have any inputs why this was not addressed in the previous PR #16437 ? I mean is this a valid bug ?

I may tag cc @eh2077 as well since you worked on a similar issues in the past.

@aimane-chnaif
Copy link
Contributor

@fedirjh you're correct. We didn't address that intentionally.
Codeblock is always strikethrough when deleted offline. And no reason for preventing strikethrough inside strikethrough tag.
So I think this is expected behavior.

There are some issues related to strikethrough codeblock, quote when deleted offline:
#15571
#17365
#18042

@kerupuksambel
Copy link

@fedirjh you're correct. We didn't address that intentionally. Codeblock is always strikethrough when deleted offline. And no reason for preventing strikethrough inside strikethrough tag. So I think this is expected behavior.

There are some issues related to strikethrough codeblock, quote when deleted offline: #15571 #17365 #18042

If I may add, this issue is happened on online state, should it be treated like the offline state as well?

@aimane-chnaif
Copy link
Contributor

If I may add, this issue is happened on online state, should it be treated like the offline state as well?

I didn't mean that. There's already pattern of codeblock being "strikethrough"ed. So I am not sure why it can be in one case, but can't be in another case.

@melvin-bot melvin-bot bot added the Overdue label May 12, 2023
@fedirjh
Copy link
Contributor

fedirjh commented May 12, 2023

Thanks for the update @aimane-chnaif, I have started a discussion https://expensify.slack.com/archives/C02NK2DQWUX/p1683929440780999?thread_ts=1680027731.102599&cid=C02NK2DQWUX to get more inputs.

@melvin-bot melvin-bot bot removed the Overdue label May 12, 2023
@fedirjh
Copy link
Contributor

fedirjh commented May 15, 2023

@bfitzexpensify I think this should be closed as per Slack discussion

@bfitzexpensify
Copy link
Contributor

Cool, I agree. Closing this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

7 participants