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 "copy to clipboard" button inside field tooltips #37

Open
gmclelland opened this issue Feb 14, 2017 · 6 comments
Open

Add "copy to clipboard" button inside field tooltips #37

gmclelland opened this issue Feb 14, 2017 · 6 comments

Comments

@gmclelland
Copy link
Contributor

Hey @rolandtoth,

What do you think about adding a "Copy" button to copy the field name in the field's tooltip?

The "Copy" button would copy the field name to clipboard for quick and easy pasting into templates.

edit page fall cleanups creeksidecleanup dev 2017-02-14 08-11-58

Maybe you could use something like https://clipboardjs.com/ to help with the javascript.

Here is how Github does it https://github.com/blog/1365-a-more-transparent-clipboard-button.

There may be even more use cases that could use a copy button, but that is the first to come to mind. Maybe to also copy template names, roles, or permissions?

@rolandtoth
Copy link
Owner

I've thought about using clipboardjs or similar but for longer texts. The names you list to copy are usually not that long that it would deserve a copy button imo, but I'm open to this if there's a good reason.

@gmclelland
Copy link
Contributor Author

It's not that the names are long, but it is just faster to click a copy button than having to put your cursor in the right spot and click and drag to highlight the text.

@rolandtoth
Copy link
Owner

Maybe it's just me but it's easier to me to write these texts by hand instead of copying.

@gmclelland
Copy link
Contributor Author

No worries, if you don't want to include it. Just now as we speak I couldn't figure out why my template wasn't outputting any data even though the selector looked right.

Turns out I was using the template_name instead of template-name in my selector. Maybe that could have been prevented with a copy button? 😄

@rolandtoth
Copy link
Owner

rolandtoth commented Feb 16, 2017

I'm not against it but would like to have a more general solution plus a UI that doesn't get into the way. My idea is that instead of the tooltip the field label could be clicked and a menu would appear, including a few menu items, eg. edit field, copy field name, etc. I'll wait for the new admin theme with any changes though.

@gmclelland
Copy link
Contributor Author

That sounds good as well.

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

No branches or pull requests

2 participants