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 option for some text fields #63

Open
Ellypse opened this issue Jan 15, 2018 · 3 comments
Open

Add copy option for some text fields #63

Ellypse opened this issue Jan 15, 2018 · 3 comments

Comments

@Ellypse
Copy link
Member

Ellypse commented Jan 15, 2018

It would be interesting to allow people to copy some of the information in someone's profile or in some other parts of the UI (kind of like you could copy someone's info from a web page).

How I see it is that we would create a widget (so the code can be easily abstracted and re-used everywhere) that when you Ctrl + Click (?) on the text, the widget turns into an edit box that is autofocused with the text preselected so they can Ctrl + C. When the field loses focus, the edit box goes away and the text element is put back in.

It could be used on the profile page (player, companions), in the directory, and more.
It could probably get tied in with issue #37 where Ctrl + Clicking an at-first-glance slot would open a custom copy frame.
The option could be added to some menus once we have finally switched to custom dropdown menus.

@Meorawr
Copy link
Member

Meorawr commented Mar 5, 2018

One catch of course is FontStrings don't support script handlers. We'd need to upgrade them to Frames and add forwarding calls for SetText and co. Not too much of a pain.

Easy solution would be to add a Mixin that has the methods for popping up a small dialog with the text itself in, similar to most add-ons let you copy links in chat for example.

I'd be wary about making the field itself become an edit box. It might visually come off as a way of making the field itself look editable in-place.

@Ellypse
Copy link
Member Author

Ellypse commented Mar 5, 2018

Hmm, I haven't thought of that, good call.

This ticket was really an idea thrown at the wall to see what could be made of it. It hasn't been requested (not that way at least). It's really a "what if" thing.

@Meorawr
Copy link
Member

Meorawr commented Mar 5, 2018

My feeling on the usefulness is that it's not too great; off the top of my head most fields are quite short with the exception of the about page. If that were copyable it'd need a tiny bit of custom logic since, well, HTML.

I'll put this one in the very furthest back reaches of my mind for now.

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