-
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 2024-04-09] [$500] Mark down - Live preview for code block with strikethrough is incorrect #37533
Comments
Triggered auto assignment to @puneetlath ( |
We think that this bug might be related to #vip-vsp |
@puneetlath FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
Job added to Upwork: https://www.upwork.com/jobs/~012e80f0cbfad42ad6 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.The issue at hand involves the live markdown preview in the New Expensify app. When a user types code within a chat and applies the strikethrough markdown, the live preview incorrectly displays the strikethrough effect. However, upon sending the text, the sent message does not reflect the strikethrough within the code block. This inconsistency between the live preview and the actual message sent leads to confusion. What is the root cause of that problem?The root cause of this problem lies within the markdown rendering logic used. Specifically, the issue arises from the live preview functionality not accurately mirroring the markdown parsing rules that are applied to the text once it is sent. The discrepancy indicates that the parsing rules for strikethrough text are not being consistently applied or that the code block rendering logic in the live preview does not correctly handle strikethrough markdown. What changes do you think we should make in order to solve the problem?To address this issue, we need to make the following changes:
// Pseudo-code example for updating markdown rendering logic
function renderMarkdown(text) {
// Logic to detect and ignore strikethrough within code blocks
const updatedText = text.replace(/(```[\s\S]*?```|`[^`]*`)/g, block => {
// Remove strikethrough syntax inside code blocks
return block.replace(/~~(.*?)~~/g, '$1');
});
return render(updatedText); // Existing function to render markdown
} |
I'm not able to reproduce this one |
@brandonhenry live markdown is only on mobile right now, FYI. I'm able to reproduce it there. |
this issue seems related to https://github.com/Expensify/react-native-live-markdown shouldn't this be posted there? @puneetlath |
ProposalPlease re-state the problem that we are trying to solve in this issue.The live markdown shows a preview of a strikethrough + code fence markdown, but when sent, the strikethrough is not applied. What is the root cause of that problem?One of the differences between the live markdown and the sent markdown is that the live markdown set In ExpensiMark rule, strikethrough won't be converted to HTML if it includes a However, if What changes do you think we should make in order to solve the problem?I'm pretty sure we want to keep the old behavior, that is to prevent strikethrough being converted to HTML when it contains a codefence. To fix it, instead of checking whether it includes the opening tag (i.e., We need to apply the fix to all occurrences (bold, strikethrough, italic, link) What alternative solutions did you explore? (Optional)
|
@puneetlath, @allroundexperts Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@puneetlath, @allroundexperts Eep! 4 days overdue now. Issues have feelings too... |
Reviewing today. |
Thanks for the proposal @brandonhenry. I think you missed to include italics / links in your proposal which in my opinion should be removed as well. Also, I think for consistency, we should follow the pattern already established in the As such, I think @bernhardoj's proposal looks better to me. 🎀 👀 🎀 C+ reviewed |
Current assignee @puneetlath is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
@puneetlath, @allroundexperts Huh... This is 4 days overdue. Who can take care of this? |
Sounds good 👍🏾 |
❌ There was an error making the offer to @bernhardoj for the Contributor role. The BZ member will need to manually hire the contributor. |
The expensify-common PR is here cc: @allroundexperts |
@puneetlath @allroundexperts @bernhardoj this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
I am reviewing this Melv |
Copying the comment from the PR to here for visibility.
@puneetlath @allroundexperts we would need to update the
I see that this issue will update the |
Makes sense to me. |
Please hold your issue to #38152 instead. |
Thanks @shubham1206agra. I see that #38152 bumps |
Looks like that was merged. Can you test that everything is working as expected with our changes in this issue? |
Here is the retesting result, all works fine (as the live markdown is now available on Web, I have included the web result too): AndroidScreen.Recording.2024-03-28.at.11.50.08.moviOSScreen.Recording.2024-03-28.at.11.45.34.movAndroid mWebScreen.Recording.2024-03-28.at.11.49.17.moviOS mWebScreen.Recording.2024-03-28.at.11.47.33.movDesktopScreen.Recording.2024-03-28.at.11.42.49.movWebScreen.Recording.2024-03-28.at.11.40.35.mov |
Ok great! So we can pay according to when that PR goes to production. |
@puneetlath, @allroundexperts, @bernhardoj Still overdue 6 days?! Let's take care of this! |
Payment summary:
@bernhardoj can you please accept the Upwork offer? https://www.upwork.com/nx/wm/offer/101349515 |
@bernhardoj has been paid. @allroundexperts please request on NewDot. Thanks everyone! |
$500 approved for @allroundexperts |
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.45-1
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: Applause - Internal Team
Slack conversation:
Action Performed:
Code
Expected Result:
The live mark down preview for
should correctly show the actual mark downCode
Actual Result:
The live mark down preview for
is incorrect. It shows that the strikethrough is applied, when strikethrough does not work with code block in the sent textCode
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6397312_1709225866856.Screen_Recording_20240229_224538_New_Expensify.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: