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

fix: show correct copy to clipboard option for linked emails #19599

Merged
merged 2 commits into from
May 30, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ const BaseAnchorForCommentsOnly = (props) => {
inline
onSecondaryInteraction={(event) => {
ReportActionContextMenu.showContextMenu(
Str.isValidEmailMarkdown(props.displayName) ? ContextMenuActions.CONTEXT_MENU_TYPES.EMAIL : ContextMenuActions.CONTEXT_MENU_TYPES.LINK,
props.href.indexOf('mailto:') === 0 && Str.isValidEmailMarkdown(props.displayName)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@allroundexperts shouldn’t we make text linked to emails to be copy email instead of copy link . Same we did for url links in this pr , I think we should consider the email links as well . What are your thoughts @jasperhuangg ?

[mail](test@gmail.com) // display copy email for this markdown as the link is a mail link ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a small change and we can handle it in this PR. I'll wait for @jasperhuangg go ahead before adding it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @jasperhuangg what’s your thoughts on #19599 (comment) ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, thanks for catching this!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fedirjh Handled.

? ContextMenuActions.CONTEXT_MENU_TYPES.EMAIL
: ContextMenuActions.CONTEXT_MENU_TYPES.LINK,
event,
props.href,
lodashGet(linkRef, 'current'),
Expand Down