Skip to content

[$500] Right clicking email address shows pop up that says Copy URL to clipboard #8006

Closed

Description

@mvtglobally

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:

  1. Right click an email address in NewDot

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?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

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
image - 2022-03-04T001730 206

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

Activity

  1. MelvinBot commented on Mar 4, 2022

    @MelvinBot
    Contributor

    Triggered auto assignment to @madmax330 (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

  2. mateusbra commented on Mar 4, 2022

    @mateusbra
    Contributor

    PROPOSAL

    (if external)

    1. First we have to add translations to en.js and es.js:
    //en.js
    copyEmailToClipboard: 'Copy e-mail to clipboard',
    //es.js
    copyEmailToClipboard: 'Copiar e-mail al portapapeles',
    1. We should create a new action within ContextMenuActions.js:
      {
      textTranslateKey: 'reportActionContextMenu.copyURLToClipboard',
      icon: Expensicons.Clipboard,
      successTextTranslateKey: 'reportActionContextMenu.copied',
      successIcon: Expensicons.Checkmark,
      shouldShow: type => type === CONTEXT_MENU_TYPES.LINK,
      onPress: (closePopover, {selection}) => {
      Clipboard.setString(selection);
      hideContextMenu(true, ReportActionComposeFocusManager.focus);
      },

      add to line 39 removing mailto::
        {
            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:

    const CONTEXT_MENU_TYPES = {
    LINK: 'LINK',
    REPORT_ACTION: 'REPORT_ACTION',
    };

    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:
    const isAttachment = Boolean(htmlAttribs['data-expensify-source']);
    const fileName = lodashGet(props.tnode, 'domNode.children[0].data', '');
    const parentStyle = lodashGet(props.tnode, 'parent.styles.nativeTextRet', {});

    Here we will add:

    const link = lodashGet(props.tnode, 'domNode.children[0].data', '');

    and also add the link prop within our anchorForCommentsOnlyPropTypes.js

    1. Now we have to call the properly context menu for the URL or Email here:
      ContextMenuActions.CONTEXT_MENU_TYPES.LINK,

      Change this line to:
    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 RECORDING

    2022-03-04.17-58-58.mp4
  3. added
    External
    on Mar 7, 2022
  4. MelvinBot commented on Mar 7, 2022

    @MelvinBot
    Contributor

    Triggered auto assignment to @michaelhaxhiu (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

  5. michaelhaxhiu commented on Mar 10, 2022

    @michaelhaxhiu
    Contributor

    Job is posted to upwork here.

  6. 20 remaining items

  7. removed
    Help Wanted
    on Mar 16, 2022
  8. MelvinBot commented on Mar 16, 2022

    @MelvinBot
    Contributor

    📣 @mateusbra You have been assigned to this job by @marcochavezf!
    Please apply to this job in Upwork 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 📖

  9. mateusbra commented on Mar 16, 2022

    @mateusbra
    Contributor

    Applied on Upwork, once I'm hired I'll rise a PR.

  10. mallenexpensify commented on Mar 17, 2022

    @mallenexpensify
    Contributor

    Hired @mateusbra , @Santhosh-Sellavel can you apply too please for Contributor+? https://www.upwork.com/jobs/~01f207936302328d06

  11. Santhosh-Sellavel commented on Mar 17, 2022

    @Santhosh-Sellavel
    Collaborator
  12. michaelhaxhiu commented on Mar 17, 2022

    @michaelhaxhiu
    Contributor

    Hired 👍

  13. michaelhaxhiu commented on Mar 28, 2022

    @michaelhaxhiu
    Contributor

    Update on behalf of @mateusbra -- PR was merged to staging 4 days ago. Looks like we discovered another bug that @mateusbra reported #8311.

  14. michaelhaxhiu commented on Apr 5, 2022

    @michaelhaxhiu
    Contributor

    Can you provide an update on this one please?

  15. mateusbra commented on Apr 5, 2022

    @mateusbra
    Contributor

    Hey @michaelhaxhiu, I think this was deployed to production has 6 days from #8195 (comment)

  16. michaelhaxhiu commented on Apr 5, 2022

    @michaelhaxhiu
    Contributor

    I noticed iOS failed to deploy and was curious if that changes anything

  17. Santhosh-Sellavel commented on Apr 9, 2022

    @Santhosh-Sellavel
    Collaborator

    @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!

  18. michaelhaxhiu commented on Apr 11, 2022

    @michaelhaxhiu
    Contributor

    @Santhosh-Sellavel thanks for the input, makes sense - it was a false alarm on my side!

    Both paid!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

EngineeringExternalWeekly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions