Skip to content

Add dropdown menu to DataField with Copy Value #583

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

Merged

Conversation

crcatala
Copy link
Contributor

@crcatala crcatala commented Jan 29, 2018

Closes #118

Adds a dropdown to Data Field with Copy Value. Can support more actions in future via this dropdown

vue-devtools-copy-value

Refs #442

@crcatala
Copy link
Contributor Author

crcatala commented Jan 29, 2018

Some items up for discussion:

  • Currently only one item in dropdown menu which seems odd. Other actions can be added here in the future though is the idea.
  • Leveraged the copyToClipboard function, but duplicated for now. Not sure how authors want to abstract this service (I see a utils dir)
  • For some values such as NaN, undefined, etc the copied value is something like "__vue_devtool_nan__".
  • Added an UNscoped style tag to style the popover .popover.context-menu-popover since it is rendered outside main app node (popper.js implementation). Not sure if we should move elsewhere.
  • Copy Value copies the value of key, but not inclusive of the key. For example in the give the copied value is [1,2] and not items: [1,2]

Refs vuejs#442

* Adds more actions to dropdown
* Currently adds one item - Copy Value (to clipboard)
@Akryum Akryum merged commit 6628719 into vuejs:master Jul 30, 2018
@crcatala
Copy link
Contributor Author

Thanks for getting my PR in @Akryum , appreciate all the hard work you and team are doing on the devtools! Looking forward to 4.x release 🙌 🎉

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

Successfully merging this pull request may close these issues.

2 participants