Skip to content

Ability to copy an object to text #442

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

Closed
MikaelEdebro opened this issue Oct 26, 2017 · 6 comments
Closed

Ability to copy an object to text #442

MikaelEdebro opened this issue Oct 26, 2017 · 6 comments

Comments

@MikaelEdebro
Copy link

One feature that would be awesome is to be able to right click an object in the vue-devtools store panel, and select "Copy to text".
Sometimes I find it can be very useful to be able to copy for example an array of objects, and paste it to a text editor. That way I don't have to expand all the array objects one by one, and I can perform text searches of the data.

@posva
Copy link
Member

posva commented Oct 30, 2017

Are you aware you can copy the state already by clicking on the copy button?

@MikaelEdebro
Copy link
Author

@posva Yes I've seen this. However this copies the entire state. It would be nice to be able to copy just one single object/array/etc.

@crcatala
Copy link
Contributor

This would be useful to copy partial state, an for the component inspector to copy values there also. We could add to the existing inline quick edit actions in DataField. Maybe something like:

copy-value copy-value-hover

Would love to contribute a PR on this. Thoughts or any specific implementation you had in mind?

@MikaelEdebro
Copy link
Author

@crcatala Yes, something like that would be awesome. Don't know if anyone else than me think this would be a great feature?
I find myself wanting to copy some object (as JSON) quite often, just to paste it in to some text editor to diff with another one.

@Akryum
Copy link
Member

Akryum commented Jan 24, 2018

I suggest adding a context menu with several items, like copy value or store as global var. Let's not clutter the state inspector too much (there are Edit buttons already).

@crcatala
Copy link
Contributor

@Akryum fair point, to support further actions in the future perhaps a context dropdown such as:

more-actions-dropdown

crcatala added a commit to crcatala/vue-devtools that referenced this issue Jan 29, 2018
Refs vuejs#442

* Adds more actions to dropdown
* Currently adds one item - Copy Value (to clipboard)
crcatala added a commit to crcatala/vue-devtools that referenced this issue Jan 29, 2018
Refs vuejs#442

* Adds more actions to dropdown
* Currently adds one item - Copy Value (to clipboard)
crcatala added a commit to crcatala/vue-devtools that referenced this issue Jan 29, 2018
Refs vuejs#442

* Adds more actions to dropdown
* Currently adds one item - Copy Value (to clipboard)
crcatala added a commit to crcatala/vue-devtools that referenced this issue Jan 29, 2018
Refs vuejs#442

* Adds more actions to dropdown
* Currently adds one item - Copy Value (to clipboard)
crcatala added a commit to crcatala/vue-devtools that referenced this issue Jan 29, 2018
Refs vuejs#442

* Adds more actions to dropdown
* Currently adds one item - Copy Value (to clipboard)
Akryum pushed a commit that referenced this issue Jul 30, 2018
* Add context menu to DataField

Refs #442

* Adds more actions to dropdown
* Currently adds one item - Copy Value (to clipboard)

* feat: refactor to VueDropdown + auto close delay
@Akryum Akryum closed this as completed Sep 9, 2018
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

4 participants