-
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
[$1000] Chat - Adding dot to edited link and non edited link creates different result #25532
Comments
Triggered auto assignment to @MitchExpensify ( |
Bug0 Triage Checklist (Main S/O)
|
Proposed solutionPlease re-state the problem that we are trying to solve in this issue.Chat - Adding dot to edited link and non edited link creates different result What is the root cause of that problem? The regex for link parsing in the E\Common does not match a url ending with dot (.) http://localhost:8082/r/7390778945681131 Due that link parsing rule doesn't kicks and autolink rule kicks in which generates output as below. [http://localhost:8082/r/7390778945681131](http://localhost:8082/r/7390778945681131X.) What changes do you think we should make in order to solve the problem? Updating url is the only solution but before that we need to understand expected behaviour. Because when a url ending with dot (.) is sent, parsed link doesn't include dot which seems a correct. What alternative solutions did you explore? (Optional)Do nothing since adding a dot is not a valid case. |
ProposalPlease re-state the problem that we are trying to solve in this issue.There is an inconsistency when we add a dot to a url What is the root cause of that problem?When we transform the comment in html, we transform the markdown But when we add a dot at the end of the url it's not recognized as a url so this transformation doesn't happen. Later we transfrom the links that are not already in So in our case we have The reason for the inconsistency is that if it looks like the user purpusefully wanted to remove a link, we remove it here; App/src/libs/actions/Report.js Lines 1067 to 1076 in 64ecc7a
In the first case we pass from In the second case we pass from The weird part is that when we type http://google.com/. the dot is not in the href but if we add a ) after http://google.com/.) , the dot is in the href. I think it's the real bug What changes do you think we should make in order to solve the problem?We can remove the dot if the url ends with a dot, we already do it for the closing parenthesis here: If we do that there will still be an inconstistency but I think this inconsistency is expected due to how we detect removed links. Both links will be removed when we pass from The same behaviour that we observe with dot also happens for every characters that is a valid path character but that can't be at the end of the path, so we should remove all those characters: What alternative solutions did you explore? (Optional)We can also remove the closing parenthesis in the last escapedChar of this line https://github.com/Expensify/expensify-common/blob/7735de14112a968fd6a4f5af710d2fbaefc8809d/lib/Url.js#L7 but I think that´s not a good idea |
This seems to impact links when you send then first before editing. Lets make sure the proposal fixes this in general versus just when edited but I imagine it will |
Job added to Upwork: https://www.upwork.com/jobs/~011e9f2df956de96c7 |
Current assignee @MitchExpensify is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @0xmiroslav ( |
@MitchExpensify I actually think we have a general problem about escaping the comment before it arrives to the autolink rule, I explained it here: https://expensify.slack.com/archives/C01GTK53T8Q/p1692652863768869 |
ProposalI found the way we did for end parenthesis, we can do the same for dots maybe |
Got it @ShogunFire , cool. Whatever we do here should solve this in general. |
Damm @ShogunFire I was thinking the same, removing dot. |
@0xmiroslav what do you think about @ShogunFire's proposal? |
@MitchExpensify, @0xmiroslav Eep! 4 days overdue now. Issues have feelings too... |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@0xmiroslav bump |
@ShogunFire thanks for the deep research on the root cause and solution. I agree with your analysis. |
Triggered auto assignment to @MonilBhavsar, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Current assignee @0xmiroslav is eligible for the Internal assigner, not assigning anyone new. |
Not overdue. PR is awaiting review from @MonilBhavsar |
I reviewed and left a small comment. Looks good overall! |
@ShogunFire, @MonilBhavsar, @MitchExpensify, @0xmiroslav Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@MonilBhavsar There is some change and a question in the PR if you missed it |
I commented on the PR, thanks! |
@ShogunFire, @MonilBhavsar, @MitchExpensify, @0xmiroslav Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@ShogunFire, @MonilBhavsar, @MitchExpensify, @0xmiroslav 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
What do you need to help move this along at this point @0xmiroslav ? |
Waiting feedback on Expensify/expensify-common#575 (comment) |
@ShogunFire, @MonilBhavsar, @MitchExpensify, @0xmiroslav Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
PR was merged |
@ShogunFire, @MonilBhavsar, @MitchExpensify, @0xmiroslav Whoops! This issue is 2 days overdue. Let's get this updated quick! |
The PR was merged. Is there a regression and is issue back again? 🤔 cc @0xmiroslav |
@ShogunFire, @MonilBhavsar, @MitchExpensify, @0xmiroslav Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Payment summary: $250 - @dhanashree-sawant reporter |
Invites sent for payment! https://www.upwork.com/jobs/~011e9f2df956de96c7 |
Thanks @MitchExpensify, I have accepted the offer. |
Paid @dhanashree-sawant @ShogunFire ! Have you accepted the offer @0xmiroslav ? |
Paid, @0xmiroslav ! Do we need a new regression test here to close this out? I don't see the automated BZ step comment 👀 |
We added automated test cases in PR. So that should cover regression test. |
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:
App should display in similar format if we add character in edited link then in non edited link
Actual Result:
App displays link in different format if we add dot character in edited link then in non edited link
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.55-7
Reproducible in staging?: Yes
Reproducible in production?: Yes
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
different.format.for.dot.in.edit.and.non.edited.link.mp4
Recording.2936.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1691601704532849
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: