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

[$250] Chat -There is no option to Copy link when right-clicking on the image background #55430

Closed
2 of 8 tasks
IuliiaHerets opened this issue Jan 17, 2025 · 20 comments
Closed
2 of 8 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 Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Jan 17, 2025

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: v9.0.87-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
Issue reported by: Applause Internal Team
Device used: Mac 15.2/ Safari
App Component: Chat Report View

Action Performed:

  1. Navigate to https://staging.new.expensify.com
  2. Open any chat with image
  3. Right-click on the message background

Expected Result:

There is an option to copy link

Actual Result:

There is no option to Copy link in the action menu when right-clicking on the image background

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6717053_1737141667545.Recording__418.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021882630206126799516
  • Upwork Job ID: 1882630206126799516
  • Last Price Increase: 2025-02-07
Issue OwnerCurrent Issue Owner: @ntdiary
@IuliiaHerets IuliiaHerets added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Jan 17, 2025
Copy link

melvin-bot bot commented Jan 17, 2025

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.

@gijoe0295
Copy link
Contributor

gijoe0295 commented Jan 17, 2025

Proposal

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

There is no option to Copy link when right-clicking on the image background

What is the root cause of that problem?

We intentionally hide the copy link menu while right-click on images to avoid confusion where there were two quite similar menus Copy link & Copy to clipboard (context):

// Only hide the copylink menu item when context menu is opened over img element.
const isAttachmentTarget = menuTarget?.current && 'tagName' in menuTarget.current && menuTarget?.current.tagName === 'IMG' && isAttachment;
return type === CONST.CONTEXT_MENU_TYPES.REPORT_ACTION && !isAttachmentTarget && !isMessageDeleted(reportAction);

However later we decided to hide the Copy to clipboard on attachments as well:

type === CONST.CONTEXT_MENU_TYPES.REPORT_ACTION && !isReportActionAttachment(reportAction) && !isMessageDeleted(reportAction) && !isTripPreview(reportAction),

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

We no longer need to hide Copy link on images and just simply remove the !isAttachmentTarget check.

return type === CONST.CONTEXT_MENU_TYPES.REPORT_ACTION && !isAttachmentTarget && !isMessageDeleted(reportAction);

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

NA

What alternative solutions did you explore? (Optional)

NA
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@melvin-bot melvin-bot bot added the Overdue label Jan 20, 2025
Copy link

melvin-bot bot commented Jan 21, 2025

@strepanier03 Whoops! This issue is 2 days overdue. Let's get this updated quick!

Copy link

melvin-bot bot commented Jan 23, 2025

@strepanier03 Eep! 4 days overdue now. Issues have feelings too...

@strepanier03 strepanier03 added the External Added to denote the issue can be worked on by a contributor label Jan 24, 2025
@melvin-bot melvin-bot bot changed the title Chat -There is no option to Copy link when right-clicking on the image background [$250] Chat -There is no option to Copy link when right-clicking on the image background Jan 24, 2025
Copy link

melvin-bot bot commented Jan 24, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 24, 2025
Copy link

melvin-bot bot commented Jan 24, 2025

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

@melvin-bot melvin-bot bot removed the Overdue label Jan 24, 2025
@strepanier03
Copy link
Contributor

Confirmed and reproducible.

Image Image

@ntdiary
Copy link
Contributor

ntdiary commented Jan 24, 2025

After reviewing multiple related issues and conversations, I think it would be better to double confirm the expected behavior first, maybe we should display copy (image) to clipboard(if possible), rather than copy link, or maybe both them. :)

  • In issue 7462, we decided to temporarily remove the "copy to clipboard" option because we wanted to wait for the copy/paste image feature to be completed.

  • In issue 9660, we decided to disable the copy link option for attachment message, and here is a good explanation for that decision.

  • issue 21346 was originally expected to enable the copy link option for attachments, but the final solution is to disable the copy link option for attachments on native platforms.

  • PR 35462 is a TS migration task, but seems accidentally enabled the copy link option for attachments.

  • issue #4629 wanted to implement the ability to copy images to the clipboard, but was closed due to issue #41239. However, seems 41239 implemented the functionality of pasting into the input box and didn't implement copying images feature?

Copy link

melvin-bot bot commented Jan 28, 2025

@ntdiary, @strepanier03 Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Jan 28, 2025
@ntdiary
Copy link
Contributor

ntdiary commented Jan 29, 2025

After reviewing multiple related issues and conversations, I think it would be better to double confirm the expected behavior first, maybe we should display copy (image) to clipboard(if possible), rather than copy link, or maybe both them. :)

@strepanier03, any new thoughts on the comment above? also cc @roryabraham @Beamanator, @trjExpensify, because you were involved in issue #4629, maybe can share some insights to help us determine how to handle this issue. :D

@melvin-bot melvin-bot bot removed the Overdue label Jan 29, 2025
@trjExpensify
Copy link
Contributor

Hm, I haven't really been close to this one, or at least since maybe 2021. Rory might have a stronger take.

My hot take is that I would expect to be able to link to where in the chat history someone sent an attachment ("Copy link"), as well as have the option to Share or Save the attachment.

I don't personally really care too much for copying an image someone sent to clipboard. Thinking about my use of Slack, I'm more likely to copy the link to the message to reference it somewhere else, or occasionally saving it.

@roryabraham roryabraham self-assigned this Jan 31, 2025
@roryabraham
Copy link
Contributor

(self-assigning so I come back to this to give my take)

Copy link

melvin-bot bot commented Jan 31, 2025

@ntdiary @strepanier03 @roryabraham this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

Copy link

melvin-bot bot commented Jan 31, 2025

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Feb 3, 2025

@ntdiary, @strepanier03, @roryabraham Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Feb 5, 2025

@ntdiary, @strepanier03, @roryabraham Eep! 4 days overdue now. Issues have feelings too...

Copy link

melvin-bot bot commented Feb 7, 2025

@ntdiary, @strepanier03, @roryabraham Still overdue 6 days?! Let's take care of this!

Copy link

melvin-bot bot commented Feb 7, 2025

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

@roryabraham
Copy link
Contributor

I think for now, we've got bigger fish to fry. I'm going to go ahead and close this out for #focus. You can always download the image if you want

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 Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
Status: Done
Development

No branches or pull requests

7 participants