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

Add a button to copy a result to the clipboard #499

Open
joewiz opened this issue Jul 13, 2022 · 2 comments
Open

Add a button to copy a result to the clipboard #499

joewiz opened this issue Jul 13, 2022 · 2 comments

Comments

@joewiz
Copy link
Member

joewiz commented Jul 13, 2022

Is your feature request related to a problem? Please describe.

Often users want to copy the results of a query to the clipboard. For long results it is cumbersome to select the entire result.

Describe the solution you'd like

Add a button beneath each "numbered result", with the label "copy" or the clipboard emoji 📋. Selecting this button would copy the string value of the item to the clipboard. The solution could use https://clipboardjs.com/.

With #491 results are displayed with syntax highlighting. I think the clipboard should only copy the plain text, if possible.

All Output methods except Direct Output support the "numbered result" display described above. So it might not be possible to support the copy to clipboard feature for Direct Output.

Describe alternatives you've considered

The copy button could copy syntax-highlighted results (added with #491), and then users would have to use their own methods to "paste as plain text" or "paste and match style", etc.

Additional context

n/a

@marmoure
Copy link
Contributor

marmoure commented Oct 6, 2022

this should be closed as #513 is merged!

@joewiz
Copy link
Member Author

joewiz commented Oct 6, 2022

While #513 is a huge step forward and a wonderful new feature, this issue has a slightly different use case: the need to copy a single result to the clipboard. While, together with #527, a user could limit the results to a single result and use next/prev buttons to get just the one they want, and then use the copy button, that is not as simple as the feature envisioned here. So I’d like to keep it open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants