Skip to content
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

[PAID] [$250] Chat - Manually copied and pasted user mention turns into user profile hyperlink #41798

Closed
1 of 6 tasks
lanitochka17 opened this issue May 7, 2024 · 20 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@lanitochka17
Copy link

lanitochka17 commented May 7, 2024

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.4.71-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: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Log in to New Expensify
  2. Navigate to any chat
  3. Manually select, copy and paste the message
  4. Send the message

Expected Result:

Copied user mention should remain a mention

Actual Result:

Manually copied and pasted user mention turns in to hyperlink leading to the user profile

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

Add any screenshot/video evidence

Bug6474088_1715104769258.2024-05-07_18-39-15.1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01cc954368da0c91d3
  • Upwork Job ID: 1788782724202225664
  • Last Price Increase: 2024-05-10
  • Automatic offers:
    • c3024 | Reviewer | 0
    • bernhardoj | Contributor | 0
Issue OwnerCurrent Issue Owner: @strepanier03
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 7, 2024
Copy link

melvin-bot bot commented May 7, 2024

Triggered auto assignment to @sakluger (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@lanitochka17
Copy link
Author

@sakluger FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-vsp

@bernhardoj
Copy link
Contributor

bernhardoj commented May 8, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Copying a user mention and paste it turns the text into a link markdown.

What is the root cause of that problem?

The mention text is rendered as an anchor tag.

<Text
// eslint-disable-next-line react/jsx-props-no-spreading
{...defaultRendererProps}
style={[styles.link, styleWithoutColor, StyleUtils.getMentionStyle(isOurMention), {color: StyleUtils.getMentionTextColor(isOurMention)}]}
role={CONST.ROLE.LINK}
testID="span"
href={`/${navigationRoute}`}
>

image

So, when we copy it, it will be copied as a link. This was previously fixed in #20814 by adding a testID of span because previously, if an element has a testID, the element name will be renamed to the testID, in this case span.

But in my PR here, I update the logic so that it replaces the element name only if the testID is a valid markdown name. In this case, span is not a valid markdown. It's to fix another issue here.

What changes do you think we should make in order to solve the problem?

Instead of setting the testID to span here,

we can set it to mention-user. Then, add mention-user to the valid markdown list here

const markdownElements = ['h1', 'strong', 'em', 'del', 'blockquote', 'q', 'code', 'pre', 'a', 'br', 'li', 'ul', 'ol', 'b', 'i', 's'];

_or simply add span to the valid markdown list above, but not preferable

we can add a similar fix if there is another issue found with other markdown

@melvin-bot melvin-bot bot added the Overdue label May 9, 2024
@sakluger sakluger added the External Added to denote the issue can be worked on by a contributor label May 10, 2024
Copy link

melvin-bot bot commented May 10, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01cc954368da0c91d3

@melvin-bot melvin-bot bot changed the title Chat - Manually copied and pasted user mention turns into user profile hyperlink [$250] Chat - Manually copied and pasted user mention turns into user profile hyperlink May 10, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 10, 2024
Copy link

melvin-bot bot commented May 10, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @c3024 (External)

@melvin-bot melvin-bot bot removed the Overdue label May 10, 2024
@c3024
Copy link
Contributor

c3024 commented May 10, 2024

@bernhardoj 's proposal here looks good to me.

🎀 👀 🎀 C+ Reviewed

Copy link

melvin-bot bot commented May 10, 2024

Triggered auto assignment to @luacmartins, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 10, 2024
Copy link

melvin-bot bot commented May 10, 2024

📣 @c3024 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented May 10, 2024

📣 @bernhardoj 🎉 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 📖

@bernhardoj
Copy link
Contributor

PR is ready

cc: @c3024

@sakluger sakluger removed their assignment May 16, 2024
@sakluger sakluger removed the Bug Something is broken. Auto assigns a BugZero manager. label May 16, 2024
Copy link

melvin-bot bot commented May 16, 2024

Triggered auto assignment to @alexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 16, 2024
@sakluger sakluger self-assigned this May 16, 2024
@sakluger
Copy link
Contributor

@alexpensify I'm OOO for two weeks. Can you please help with the payment if it's due before I'm back? The PR was deployed to Staging yesterday, so it will probably be deployed to prod early next week.

@alexpensify alexpensify removed their assignment May 16, 2024
@alexpensify alexpensify added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels May 16, 2024
Copy link

melvin-bot bot commented May 16, 2024

Current assignee @sakluger is eligible for the Bug assigner, not assigning anyone new.

@alexpensify alexpensify added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels May 16, 2024
Copy link

melvin-bot bot commented May 16, 2024

Triggered auto assignment to @strepanier03 (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@alexpensify
Copy link
Contributor

@strepanier03 - It looks like we are playing the assignment merry-go-round here. I, too, will be OOO next week and will not return until Tuesday, May 28. I'm reassigning now to get @sakluger help with the payment process. Thanks!

BZ Discussion Here: https://expensify.slack.com/archives/C01SKUP7QR0/p1715886524903119?thread_ts=1715873747.589919&cid=C01SKUP7QR0

@strepanier03
Copy link
Contributor

PR on staging so we're waiting for the 7-day hold to start.

@c3024
Copy link
Contributor

c3024 commented May 23, 2024

PR deployed to production but automation failed here.

@strepanier03
Copy link
Contributor

Deployed to production 2024-05-22, 7-days later is 2024-05-29. Updating title.

@strepanier03 strepanier03 changed the title [$250] Chat - Manually copied and pasted user mention turns into user profile hyperlink [HOLD for payment 2024-05-29] [$250] Chat - Manually copied and pasted user mention turns into user profile hyperlink May 23, 2024
@strepanier03 strepanier03 added Weekly KSv2 Daily KSv2 and removed Daily KSv2 Weekly KSv2 labels May 23, 2024
@strepanier03 strepanier03 changed the title [HOLD for payment 2024-05-29] [$250] Chat - Manually copied and pasted user mention turns into user profile hyperlink [PAID] [$250] Chat - Manually copied and pasted user mention turns into user profile hyperlink May 30, 2024
@strepanier03
Copy link
Contributor

Jobs are paid and contracts closed, thanks all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
No open projects
Archived in project
Development

No branches or pull requests

7 participants