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!
Action Performed:
- Open staging.new.expensify.com
- Send an email linked to a URL (e.g. [test@google.com](google.com) )
- Right click on the message
Expected Result :
Since the message is an email with a link, the message should be "Copy URL to Clipboard", and after selecting the menu, the URL is copied
Actual Result :
The message is "Copy Email to Clipboard", but after selecting the menu, the URL is copied - this is confusing for the user.
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
- Android / native
- Android / Chrome
- iOS / native
- iOS / Safari
- MacOS / Chrome / Safari
- MacOS / Desktop
Version Number: 1.3.13.3
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
Email.URL.Right.Click.mp4
Recording.608.mp4
Expensify/Expensify Issue URL:
Issue reported by: @kerupuksambel
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1684029611911239
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~0185cc75d081384f04
- Upwork Job ID: 1657974195145203712
- Last Price Increase: 2023-05-15
Activity
melvin-bot commentedon May 14, 2023
Triggered auto assignment to @jliexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon May 14, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)allroundexperts commentedon May 14, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Hyperlinked email still shows
Copy email to clipboardmenu.What is the root cause of that problem?
The root cause is that we're just checking if the text matches the email pattern and ignoring what the
hreflooks like here.What changes do you think we should make in order to solve the problem?
We can replace this with:
What alternative solutions did you explore? (Optional)
We can also display both
Copy email to clipboardandCopy url to clipboardin such cases by creating a newContextMenuActions.CONTEXT_MENU_TYPEScalledContextMenuActions.CONTEXT_MENU_TYPES.BOTHand calling it if href is a url and display text is an email.eh2077 commentedon May 14, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Right-click menu on email linked to URL shows
Copy email to clipboard.What is the root cause of that problem?
The root cause of this issue is that we determine the type of context menu by
props.displayNameofBaseAnchorForCommentsOnlyhereApp/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.js
Line 53 in 2e73562
and
props.displayNameis the text of anchor tag see hereApp/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js
Line 24 in 2e73562
which is buggy because
[test@gmail.com](https://google.com)[this is an email](test@gmail.com)A markdown link
is rendered as anchor tag
So, the value of
props.displayNameforBaseAnchorForCommentsOnlyistest@gmail.comand methodStr.isValidEmailMarkdownreturns true hereApp/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.js
Line 53 in 2e73562
That's why right-click menu on email linked to URL shows
Copy email to clipboard.What changes do you think we should make in order to solve the problem?
To fix this issue, we can check if the
hrefproperty of anchor tag is started withmailto:to determine it's an email address. Note that we format anchor tag for email in ExpensiMark.js, see here and here.We improve the checking condition here
App/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.js
Line 53 in 2e73562
to
Below are useful test cases to verify the solution
What alternative solutions did you explore? (Optional)
N/A
jliexpensify commentedon May 15, 2023
This isn't typical behaviour I've seen, so asking here: https://expensify.slack.com/archives/C049HHMV9SM/p1684113182168159?thread_ts=1684029611.911239&cid=C049HHMV9SM
[-]Misleading right-click menu on email linked to URL[/-][+]Right-clicking an email linked to URL and copying results in only the URL being pasted[/+][-]Right-clicking an email linked to URL and copying results in only the URL being pasted[/-][+]Right-clicking an email linked to URL and copying it results in only the URL being pasted[/+][-]Right-clicking an email linked to URL and copying it results in only the URL being pasted[/-][+]Right-clicking an email linked to URL and copying it results in the incorrect thing being copied[/+][-]Right-clicking an email linked to URL and copying it results in the incorrect thing being copied[/-][+]Misleading right-click on email linked to URL[/+][-]Misleading right-click on email linked to URL[/-][+][$1000] Misleading right-click on email linked to URL[/+]melvin-bot commentedon May 15, 2023
Job added to Upwork: https://www.upwork.com/jobs/~0185cc75d081384f04
62 remaining items
jliexpensify commentedon Jun 9, 2023
Was there a bug-reporting GH that you can link me to?
eh2077 commentedon Jun 9, 2023
@jliexpensify I didn’t file another bug report about it because I was thinking to fix it together in this issue at the beginning. I also mentioned in the slack thread when we first discussed reproduction of the bug, see https://expensify.slack.com/archives/C049HHMV9SM/p1684113923020359?thread_ts=1684029611.911239&cid=C049HHMV9SM.
I hope the links I included and @fedirjh 's last comment will be helpful for you to evaluate the case, thank you!
jliexpensify commentedon Jun 9, 2023
Thanks for the context, I'm not sure of the process here so I'll surface this internally and get back to you.
melvin-bot commentedon Jun 11, 2023
@allroundexperts @jliexpensify @jasperhuangg @fedirjh this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:
Thanks!
melvin-bot commentedon Jun 11, 2023
Current assignees @allroundexperts and @fedirjh are eligible for the Internal assigner, not assigning anyone new.
jasperhuangg commentedon Jun 12, 2023
@fedirjh what are the next steps required for us to close out this issue?
fedirjh commentedon Jun 12, 2023
@jasperhuangg We are waiting for @jliexpensify's decision #18912 (comment) to close this issue. Could you please update the title as the checklist is already filled #18912 (comment).
[-][WAITING ON CHECKLIST] [$1000] Misleading right-click on email linked to URL[/-][+][$1000] Misleading right-click on email linked to URL[/+]jliexpensify commentedon Jun 13, 2023
Apologies, I was OOO yesterday, checking the thread now.
jliexpensify commentedon Jun 13, 2023
@eh2077 - unfortunately we won't be paying you a reporting bonus here: we'll only pay a bug reporter this bonus if they have initially reported it and it's on a GH. This is our process and it's not something we can deviate from, for fairness. We do appreciate your contributions here and that you've gone above and beyond to help us discover additional issues that were fixed.
In the future, I would encourage you to raise a separate bug report for a GH to be created, this will ensure you'll get the reporting bonus (if applicable).