-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 2023-10-18] [HOLD for payment 2023-10-16] [$500] Inconsistent behavior when editing links with the same links in private notes with chat #28545
Comments
Triggered auto assignment to @NicMendonca ( |
Job added to Upwork: https://www.upwork.com/jobs/~0160ac2aef66f8c337 |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.We don't handle the case where the user want to show links as raw text not a hyperlink in the private notes page What is the root cause of that problem?we always convert the input to an html format and dont consider the case where the user removes links from the old value on purpose
What changes do you think we should make in order to solve the problem?instead of converting the input as a html right away, we should consider the original value and handle deleted links in html like we are doing in the chat handling: const originalNote = lodashGet(report, ['privateNotes', route.params.accountID, 'note'], '');
const editedNote = Report.handleUserDeletedLinksInHtml(privateNote.trim(), originalNote); POC: Screen.Recording.2023-09-30.at.9.53.46.PM.mov |
ProposalPlease re-state the problem that we are trying to solve in this issue.While editing the comment, we are not able to get the link again What is the root cause of that problem?The error is during parsing of comment while editing. What changes do you think we should make in order to solve the problem?App/src/libs/actions/Report.js Lines 1154 to 1165 in 52f0e3c
The issue is with the argument we are passing in getRemovedMarkdownLinks We are passing markdownOriginalComment(Markdown) and newCommentText(Text) What alternative solutions did you explore? (Optional)We can just convert the the new comment to markdown as well const handleUserDeletedLinksInHtml = (newCommentText, originalHtml) => {
const parser = new ExpensiMark();
if (newCommentText.length > CONST.MAX_MARKUP_LENGTH) {
return newCommentText;
}
const markdownOriginalComment = parser.htmlToMarkdown(originalHtml).trim();
const htmlForNewComment = parser.replace(newCommentText);
const markdownNewComment = parser.htmlToMarkdown(htmlForNewComment).trim();
const removedLinks = parser.getRemovedMarkdownLinks(markdownOriginalComment, markdownNewComment);
return removeLinksFromHtml(htmlForNewComment, removedLinks);
}; What alternative solutions did you explore? (Optional)N/A |
updated proposal #28545 (comment) |
Result for #28545 (comment) screen-recording-2023-09-30-at-121449-pm_IMqB0XVr.mp4 |
Hello sir |
📣 @chahedmoetaz! 📣
|
ProposalPlease re-state the problem that we are trying to solve in this issueEditing comments and private notes have different behaviors when entering the same links What is the root cause of that problem?In the code, the text is formatted differently What changes do you think we should make in order to solve the problem?To fix this bug First:
like here for comment
Second: Instead reportID we will pas report
Third: We can add a formatter for note
like here for a comment App/src/libs/actions/Report.js Lines 1179 to 1180 in 7c86d09
What alternative solutions did you explore? (Optional)NA |
@abzokhattab Thanks for the proposal. Your RCA makes sense and the solution looks good to me. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @johnmlee101, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@saranshbalyan-1234 Thanks for the proposal. The RCA is not clear. Regardless we want to the notes to behave like report messages and not the other way around. |
@ZhenjaHorbach Thanks for the proposal but I think it's a dupe. |
@s77rt the reason why i posted my proposal in the reverse way is because it seems good. Links should be treated as links not text. Kindly take another look at the behaviour. |
@saranshbalyan-1234 The behaviour of the report messages is intended and we have tests to ensure that. App/tests/actions/ReportTest.js Lines 436 to 442 in 00933e1
|
@s77rt ohhh i see, thanks |
Any updates? |
@johnmlee101 This is waiting for you 😅 #28545 (comment) |
@chahedmoetaz This is fixed already |
🎯 ⚡️ Woah @s77rt / @abzokhattab, great job pushing this forwards! ⚡️ The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉
On to the next one 🚀 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.79-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 2023-10-16. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
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:
|
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.80-3 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 2023-10-18. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
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:
|
This #28545 (comment) is irrelevant. That PR linked to this issue by mistake. The checklist for this issue is provided here #28545 (comment) |
BZ payment Summary: Reporter: @tewodrosGirmaA (paid via Upwork) - $50 |
everyone has been paid 🎉 |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
When editing links with the same links in private notes, they should change to text to maintain consistency with the chat.
Actual Result:
When editing links with the same links in private notes, they do not change to text, creating inconsistency with the message.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.73.0
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
Screen.Recording.2023-09-30.at.10.54.43.AM.mov
Screen.Recording.2023-09-29.at.10.49.36.PM.mov
Recorder_30092023_191019.mp4
Recorder_30092023_090249.mp4
screen-capture.2.mp4
Recording.4754.mp4
Expensify/Expensify Issue URL:
Issue reported by: @tewodrosGirmaA
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1695444384364589
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: