bruno icon indicating copy to clipboard operation
bruno copied to clipboard

Add Copy to Clipboard button in Variables and Environment Views

Open alexbchr opened this issue 1 year ago • 3 comments

Description

Add a "Copy to Clipboard" button in the Variables and Environment Views. Fixes #3164.

This will prevent having to select the text first before triggering a Copy functionality (which is quite awkward, especially in the Variables view).

So this PR:

  • Move the CopyToClipboard component used in Code view to its own component for better reusability.
  • Add the CopyToClipboard to Variables View
  • Add the CopyToClipboard to Environment View (and ensure it shows fine no matter if entry is secret or not)
  • Note that the icon only shows when the row is hovered.

Screenshots: image image image

Contribution Checklist:

  • [x] The pull request only addresses one issue or adds one feature.
  • [x] The pull request does not introduce any breaking changes
  • [x] I have added screenshots or gifs to help explain the change if applicable.
  • [x] I have read the contribution guidelines.
  • [x] Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

alexbchr avatar Sep 22 '24 12:09 alexbchr

Nice feature! Possible to add paste from clipboard as well? That complete this feature and greatly improve interacting with bruno.

fredx21 avatar Sep 30 '24 21:09 fredx21

Nice feature! Possible to add paste from clipboard as well? That complete this feature and greatly improve interacting with bruno.

@fredx21 Do you mind expanding a bit more on what you have in mind here?

alexbchr avatar Oct 01 '24 12:10 alexbchr

What I have in mind is being able to paste a value from the clipboard into the bruno variable.

Our work flow includes using ids from an external database. Having a back and forth copy and paste flow for coping and pasting those variables from and to bruno as you are creating is a great addition!

fredx21 avatar Oct 01 '24 12:10 fredx21

Hi @alexbchr This works fine for variables and environments, but it's breaking in other areas where we're using the SingleLineEditor, such as request parameters, variables, etc.

image

anusreesubash avatar Oct 08 '24 05:10 anusreesubash

Hi @alexbchr This works fine for variables and environments, but it's breaking in other areas where we're using the SingleLineEditor, such as request parameters, variables, etc.

image

Good point! I'll try to find some time soon to fix that out!

alexbchr avatar Oct 08 '24 13:10 alexbchr