-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Conversation
@jasperhuangg @fedirjh One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks good an test well . Left a minor suggestion
@@ -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) |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) ?
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fedirjh Handled.
cce6b31
to
2b1e825
Compare
Reviewer Checklist
Screenshots/VideosWebWeb.movMobile Web - ChromeChrome.movMobile Web - SafarimWeb.Safari.moviOSIOS.movAndroidAndroid.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and tests well
@allroundexperts Can we update the tests to include emails linked to text ?
@fedirjh Updated. |
cc @jasperhuangg All yours |
🚀 Deployed to staging by https://github.com/jasperhuangg in version: 1.3.20-1 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.20-5 🚀
|
Details
This PR fixes the
copy to clipboard
context menu message for linked emails.Fixed Issues
$ #18912
PROPOSAL: #18912 (comment)
Tests
[test@gmail.com](https://google.com)
)Copy URL to clipboard
option appears instead ofCopy Email to clipboard
.[gmail.com](test@google.com)
)Copy Email to clipboard
option appears instead ofCopy Url to clipboard
.Offline tests
N/A
QA Steps
[test@gmail.com](https://google.com)
)Copy URL to clipboard
option appears instead ofCopy Email to clipboard
.[gmail.com](test@google.com)
)Copy Email to clipboard
option appears instead ofCopy Url to clipboard
.PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Screen.Recording.2023-05-25.at.3.47.21.PM.mov
Mobile Web - Chrome
Screen.Recording.2023-05-25.at.3.58.54.PM.mov
Mobile Web - Safari
Screen.Recording.2023-05-25.at.3.57.18.PM.mov
Desktop
Screen.Recording.2023-05-25.at.3.53.37.PM.mov
iOS
Screen.Recording.2023-05-25.at.3.59.22.PM.mov
Android
Screen.Recording.2023-05-25.at.4.00.18.PM.mov