Repository navigation
Description
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.3.87.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: @namhihi237
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697045812115269
Action Performed:
- Open a chat with other user
- Click header => Private notes
- Click My note => Note
- Input any link (eg: google.com) => Save
- Click Note, remove all and input link again (eg: google.com) => Save
- Click Note => Save, Observed that text back to link
Expected Result:
Link should not change to text in the Private Note after saved 2nd time.
Actual Result:
Link changed to text in the Private Note after saved 2nd time.
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
Android: Native
Screen.Recording.2023-10-12.at.00.46.33.mov
Android: mWeb Chrome
Screen.Recording.2023-10-12.at.00.47.14.mov
iOS: Native
RPReplay_Final1697046524.MP4
iOS: mWeb Safari
RPReplay_Final1697046558.MP4
MacOS: Chrome / Safari
Screen.Recording.2023-10-12.at.00.46.03.mov
Recording.5076.mp4
MacOS: Desktop
Uploading Screen Recording 2023-10-12 at 00.46.03.mov…
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~01845ea2c6e56f7e38
- Upwork Job ID: 1715351205310087168
- Last Price Increase: 2023-10-20
- Automatic offers:
- fedirjh | Reviewer | 27439928
- eh2077 | Contributor | 27439932
- namhihi237 | Reporter | 27439936
Activity
[-]Private Note - Link changed to text in the Private Note after saved 2nd time.[/-][+][$500] Private Note - Link changed to text in the Private Note after saved 2nd time.[/+]melvin-bot commentedon Oct 20, 2023
Triggered auto assignment to @abekkala (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Oct 20, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01845ea2c6e56f7e38
melvin-bot commentedon Oct 20, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Oct 20, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (
External)abdel-h66 commentedon Oct 20, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Editing and saving a private note that contains a link without making a change, re-creates the link.
What is the root cause of that problem?
Adding a private note that contains a link will create the AutoLink on save. And when a link is removed, we will check for removed links and generate the new HTML. For the case of editing and saving a private note that contains a link without making a change, we are not supposed to generate a new HTML, as this process will trigger the Auto link again.
App/src/pages/PrivateNotes/PrivateNotesEditPage.js
Line 107 in b7eb0f1
What changes do you think we should make in order to solve the problem?
Since saving a private note that contains a link with a new change is considered an expected behavior per #29225 (comment) we can make sure that saving a note without making a change does not trigger the autolink by comparing the original note and new draft and checking differences and then in that case we return early.
What alternative solutions did you explore? (Optional)
N/A
samilabud commentedon Oct 20, 2023
How you can send a proposal at the same time the issue is published? OMG 💨
brunovjk commentedon Oct 20, 2023
In the
main branchwe have:App/src/pages/PrivateNotes/PrivateNotesEditPage.js
Line 107 in ad8b9ff
However, in another branch, like this one, we have:
App/src/pages/PrivateNotes/PrivateNotesEditPage.js
Line 107 in b7eb0f1
I managed to reproduce the error using
main const editedNote, but when I removedparser.htmlToMarkdown(...).trim(), like the branch presented previously, the error in thisissueis no longer reproduced.@kbecciv, @namhihi237 and @abdel-h66 Do you know why this is? I'm new here, thank you.
brunovjk commentedon Oct 20, 2023
@abdel-h66 I don't know why but
dismissKeyboardAndGoBackdoesn't seem to work here:Reproduction: notback.webm
I changed your solution a bit, and here on my local it works fine:
worked.webm
@abdel-h66 Make sense?
20 remaining items
melvin-bot commentedon Oct 30, 2023
📣 @eh2077 🎉 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 commentedon Oct 30, 2023
📣 @namhihi237 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!
Offer link
Upwork job
eh2077 commentedon Nov 1, 2023
@fedirjh PR #30688 is ready for review, thanks!
Li357 commentedon Nov 21, 2023
@fedirjh @eh2077 Are we good to close this one out?
fedirjh commentedon Nov 21, 2023
@Li357 It still requires payments and BZ checklist, it seems like automation didn't work for this one.
fedirjh commentedon Nov 21, 2023
BugZero Checklist:
Regression Test Proposal
google.com, and save it[google.com](https://google.com)google.comand save itgoogle.comis displayed as plain textgoogle.comabekkala commentedon Nov 22, 2023
PAYMENTS:
abekkala commentedon Nov 22, 2023
@namhihi237 - @eh2077 - @fedirjh : Payments sent and contracts ended - thank you! 🎉
abekkala commentedon Nov 22, 2023
https://github.com/Expensify/Expensify/issues/338631