HomePhabricator
Diffusion Comm 85e561da1282

Introduce message copy button on web

Tags
None
Referenced Files
F302608: icons.png
Dec 30 2022, 8:09 AM
File Not Attached
Subscribers
None

Description

Introduce message copy button on web

Summary:
The purpose of this button is to copy a message source, including the markdown. The solution uses a recommended approach https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard of interacting with the clipboard.

Linear task: https://linear.app/comm/issue/ENG-2332/copy-message-button-on-web

In this diff we're not giving any feedback to the user, especially we don't display a different tooltip when a message is successfully copied. https://www.figma.com/file/a1nkbWgbgjRlrOY9LVurTz/Comm-%2F-Desktop-app?node-id=1170%3A78271&t=LDQhPB76aimwoBhD-0 This will be handled later in the stack.

icons.png (266×472 px, 24 KB)

Depends on D6013

Test Plan:

  1. Check if the button is present only for text messages and sidebar sources based on text messages.
  2. Check if copying a text messages with non-markdown content results in clipboard being filled with its content.
  3. Check if the same happens when a message contains some markdown. Paste it and send to verify that a new message looks the same.
  4. The testing was performed on Chrome, Safari and in Electron.

Reviewers: kamil, inka, ginsu

Reviewed By: kamil, inka, ginsu

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D5852

Details

Provenance
tomekAuthored on Dec 12 2022, 8:45 AM
Reviewer
kamil
Differential Revision
D5852: Introduce message copy button on web
Parents
rCOMM2ce45ad9d425: [web] Add copy-filled icon
Branches
Unknown
Tags
Unknown