Add Copy to Clipboard button in Variables and Environment Views
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
CopyToClipboardcomponent used in Code view to its own component for better reusability. - Add the
CopyToClipboardto Variables View - Add the
CopyToClipboardto 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:
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.
Nice feature! Possible to add paste from clipboard as well? That complete this feature and greatly improve interacting with bruno.
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?
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!
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.
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.
Good point! I'll try to find some time soon to fix that out!
