-
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
[$500] Right clicking email address shows pop up that says Copy URL to clipboard #8006
Comments
Triggered auto assignment to @madmax330 ( |
PROPOSAL(if external)
//en.js
copyEmailToClipboard: 'Copy e-mail to clipboard',
//es.js
copyEmailToClipboard: 'Copiar e-mail al portapapeles',
{
textTranslateKey:'reportActionContextMenu.copyEmailToClipboard',
icon: Expensicons.Clipboard,
successTextTranslateKey: 'reportActionContextMenu.copied',
successIcon: Expensicons.Checkmark,
shouldShow: type => type === CONTEXT_MENU_TYPES.EMAIL,
onPress: (closePopover, {selection}) => {
Clipboard.setString(selection.replace("mailto:",""));
hideContextMenu(true, ReportActionComposeFocusManager.focus);
},
}, and create e-mail type here: App/src/pages/home/report/ContextMenu/ContextMenuActions.js Lines 22 to 25 in 2837a6a
add: EMAIL: 'EMAIL', 3. As we only have the fileName prop with the URL/email value, we should create another prop doing the same as fileName but with a reliabler name:App/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js Lines 19 to 21 in 6e0bffe
Here we will add: const link = lodashGet(props.tnode, 'domNode.children[0].data', ''); and also add the
Str.isValidEmail(this.props.link) ? ContextMenuActions.CONTEXT_MENU_TYPES.EMAIL : ContextMenuActions.CONTEXT_MENU_TYPES.LINK, Note: We will have to do item 4. within index.js and index.native.js to cover native and non-native applications. SCREEN RECORDING2022-03-04.17-58-58.mp4 |
Triggered auto assignment to @michaelhaxhiu ( |
Job is posted to upwork here. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel ( |
Triggered auto assignment to @marcochavezf ( |
well we can do this work by using this approach: first of all i will add an onClick() function to the container that contains email. thank you! |
I can create a button instead of ahref links. and Then I will use states to manage if it has been copied or not yet. and I will make sure following 3 steps are followed:
Secondly, for the mobile version, I will need to add a href again which will be hidden by default on desktop and toggled using media queries in the CSS: |
Proposal
onPress: (closePopover, {selection}) => {
Clipboard.setString(selection.replace('mailto:', ''));
hideContextMenu(true, ReportActionComposeFocusManager.focus);
},
translatedText(key) {
// Check wether selection is email or not
if (this.props.type === CONTEXT_MENU_TYPES.LINK && this.props.selection.includes('mailto:')) {
return this.props.translate('reportActionContextMenu.copyEmailToClipboard');
}
return this.props.translate(key);
} text={this.translatedText(contextAction.textTranslateKey)} Screen.Recording.2022-03-10.at.22.18.27.mov |
Reviewing Proposals now |
@mateusbra |
Proposal updated! |
Doubling price to $500 |
It's item 4, not item 3. Because you added a new step 3. This is why I recommend writing an updated proposal in a new comment. |
@marcochavezf So far @mateusbra proposal looks good to me! But here,
I suggest using generic prop name instead of |
I agree with that, using a generic prop name is better than having two different props that does the same. |
Thanks @Santhosh-Sellavel! Assigning @mateusbra |
📣 @mateusbra You have been assigned to this job by @marcochavezf! |
Applied on Upwork, once I'm hired I'll rise a PR. |
Hired @mateusbra , @Santhosh-Sellavel can you apply too please for Contributor+? https://www.upwork.com/jobs/~01f207936302328d06 |
Done! @mallenexpensify |
Hired 👍 |
Update on behalf of @mateusbra -- PR was merged to staging 4 days ago. Looks like we discovered another bug that @mateusbra reported #8311. |
Can you provide an update on this one please? |
Hey @michaelhaxhiu, I think this was deployed to production has 6 days from #8195 (comment) |
I noticed iOS failed to deploy and was curious if that changes anything |
@michaelhaxhiu I can see the issue fix is working fine in the current production version without any regression. We are good to go here, if needed please check this internally and update us on payment status here thanks! |
@Santhosh-Sellavel thanks for the input, makes sense - it was a false alarm on my side! Both paid! |
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:
Pop up to say Copy email to clipboard
Actual Result:
Pop up says Copy URL to clipboard.
When you copy and paste, it shows mailto:testemail@gmail.com. We should only copy the email address and not include mailto:
Workaround:
unknown
Platform:
Where is this issue occurring?
Version Number:
Reproducible in staging?:
Reproducible in production?:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Upwork job link: https://www.upwork.com/jobs/~01f207936302328d06
Issue reported by: @mallenexpensify
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1646102764234269
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: