Closed Bug 1708386 Opened 5 months ago Closed 3 months ago

Add an evaluation result message when using the `copy` helper

Categories

(DevTools :: Console, enhancement)

enhancement

Tracking

(firefox92 fixed)

RESOLVED FIXED
92 Branch
Tracking Status
firefox92 --- fixed

People

(Reporter: nchevobbe, Assigned: claubatista, Mentored)

Details

Attachments

(1 file)

Steps to reproduce

  1. Open the console
  2. Evaluate copy(1 + 1)

Expected results

A message is added in the console telling the user that a message was added to the clipboard, for example:

The following string was copied to clipboard: "2"

Actual results

No messages are displayed and the user has no way to know if the evaluation was successful or not.

Hi! I was able to reproduce.
I'd like to work on this bug. :)

Thanks Claudia,

So you might want to take a look at https://searchfox.org/mozilla-central/rev/da25888c4495585c532640f0e5efad07b1037621/devtools/client/webconsole/actions/input.js#203-204 where we do put the string (that the server sent us) into the clipboard.

In the same function, you can see how we add message to the console here https://searchfox.org/mozilla-central/rev/da25888c4495585c532640f0e5efad07b1037621/devtools/client/webconsole/actions/input.js#262-272
(the message is localized so we can have translation in multiple languages; the string is defined in https://searchfox.org/mozilla-central/rev/da25888c4495585c532640f0e5efad07b1037621/devtools/client/locales/en-US/webconsole.properties#433-436)

Let me know if you have any question!

Assignee: nobody → contatodaclau
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e25200b8eb84
[devtools] Add an evaluation result message when using the `copy` helper. r=nchevobbe
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
You need to log in before you can comment on or make changes to this bug.