-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 on #26490] [$500] Chat - Space below bold text increases after edit #29704
Comments
Triggered auto assignment to @twisterdotcom ( |
Job added to Upwork: https://www.upwork.com/jobs/~01b06817cf280a1ec0 |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Unintended spaces are added after a user edits a markdown message. What is the root cause of that problem?There are 3 main call sites on the component side where this field gets updated:
If we disable 3 in this list everything works fine, except that 3 does a bunch of string processing for many different reasons. This function calls This is where the issue occurs. The HTML is not completely cleaned, there are hidden spaces between the tags that later become line breaks when coverted to Markdown and then get passed over later into HTML on subsequent publishes. It doesn't happen the first time you compose the message because that message is done with a different editor (1 above). What changes do you think we should make in order to solve the problem?Modify LOC 1174 of Report.js with:.
This will clean the spaces between the HTML tags. An alternative fix might be to add a rule to the ExpensiMarker lib, that "cleans HTML" after parsing and conversion. What alternative solutions did you explore? (Optional)I explored all call sites on the components side where the text was parsed, saved or rendered. |
📣 @tjbo! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
ProposalPlease re-state the problem that we are trying to solve in this issue.Chat - Space below bold text increases after edit. What is the root cause of that problem?The root cause of this issue is that when adding a comment or saving draft comment below
we call ExpensiMark.replace method to first apply codeFence rule, then heading rule and last newline rule. After applying
The line break after What changes do you think we should make in order to solve the problem?When translating markdown text into HTML, the single line break between two block tags should be removed. Currently, we only support 3 block HTML tags, We can add a new rule before the newline rule to eliminate the unwanted line break between two block elements, like {
name: 'removeNewlineBetweenTwoBlockElements',
regex: /<\/(blockquote|h1|pre)>\r?\n<(blockquote|h1|pre)>/g,
replacement: `</$1><$2>`,
}, By having the new rule, we can fix the issue and pass all existing tests of Expensify-common lib. See demo Screen.Recording.2023-10-17.at.2.25.43.PM.movWhat alternative solutions did you explore? (Optional)N/A |
Might have same root cause as #26490 |
@0xmiroslav They're related but their root causes are different. This issue occurs when adding a comment and the root cause is from the markdown-to-html process. |
@0xmiroslav I think you're right, they are related. Screen.Recording.2023-10-18.at.11.02.47.AM.mov |
Nice, okay, shall we close this? And I'll pay out the bug reporter: @dhanashree-sawant? |
@twisterdotcom I guess not yet. This is not on production yet. |
@twisterdotcom While I think their root cause is different and they should be fixed individually. I think we can wait C+ team to evaluate it. |
|
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Space below bold text increases after edit. What is the root cause of that problem?
The root cause is these 3 replace regex rules in This doesn't cause problem if previous line is a normal text. For example, like below.
What changes do you think we should make in order to solve the problem?
To fix this issue, we need to prioritize For example, like below.
What alternative solutions did you explore? (Optional)N/A |
What does TAL mean? |
@twisterdotcom, @abdulrahuman5196 Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Hi, Sorry TAL means Taking a look. |
@twisterdotcom @abdulrahuman5196 this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:
Thanks! |
Current assignee @abdulrahuman5196 is eligible for the Internal assigner, not assigning anyone new. |
@twisterdotcom @abdulrahuman5196 this issue is now 4 weeks old and preventing us from maintaining WAQ. This should now be your highest priority. Please post below what your plan is to get a PR in review ASAP. Thanks! |
1 similar comment
@twisterdotcom @abdulrahuman5196 this issue is now 4 weeks old and preventing us from maintaining WAQ. This should now be your highest priority. Please post below what your plan is to get a PR in review ASAP. Thanks! |
@abdulrahuman5196 are you able to get somebody assigned here or can I reassign to a new C+? Will reassign on Monday if you're not around by then. |
Not overdue, just waiting on @abdulrahuman5196 |
Sure @twisterdotcom . I will cover this over the weekend. If not do go ahead and re-assign on monday. |
With this change, I am unable to reproduce the issue. The proposal is already approved as part of #26490. Can we put this issue on hold for #26490? @twisterdotcom Screen.Recording.2023-11-17.at.5.21.31.PM.mov |
@twisterdotcom, @abdulrahuman5196 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Done |
Looks like we'll pay out #26490 today. Is this resolved @abdulrahuman5196? Can we close? |
Let me check in my morning |
@twisterdotcom I don't see this issue on latest main. We can close this issue. |
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.3.84.7
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/p1697477034366019
Action Performed:
Hii
Expected Result:
Describe what you think should've happened
Actual Result:
Space below bold text increases on edit even when we don't add more space during edit if the text below bold text is code block
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Android.native.space.below.bold.text.increases.mp4
Android: mWeb Chrome
Android.chrome.space.below.bold.text.increases.mp4
iOS: Native
ios.native.extra.space.below.bold.text.mov
iOS: mWeb Safari
ios.safari.extra.space.below.bold.text.mov
MacOS: Chrome / Safari
windows.chrome.space.below.bold.text.increases.even.on.no.addition.of.text.mp4
mac.chrome.extra.space.below.bold.text.mov
Recording.5021.mp4
MacOS: Desktop
mac.desktop.extra.space.below.bold.text.mov
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @twisterdotcomThe text was updated successfully, but these errors were encountered: