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

Display attributes of a component in the sidebar #734

Closed
rigor789 opened this issue Aug 5, 2018 · 2 comments · Fixed by #861
Closed

Display attributes of a component in the sidebar #734

rigor789 opened this issue Aug 5, 2018 · 2 comments · Fixed by #861

Comments

@rigor789
Copy link
Contributor

rigor789 commented Aug 5, 2018

What problem does this feature solve?

Right now there is no way to see all the attributes passed to a component. In some cases it could be useful to see the values of $attrs in the sidebar, especially for functional components.

Additionally it would be nice to have an option to show the attributes in the component tree - this may get messy in some cases, so this would need to be opt-in via settings.

Reason for this feature request: Once #732 is merged we are one step closer to bringing VueDevtools into the NativeScript-Vue toolchain. In the upcoming 2.0 release of NativeScript-Vue we wrapped all elements into functional components, to be able to see them in VueDevtools, these elements can have attrivutes and it would help debug if we could see the values.

Example:

<ActionBar class="action-bar" title="Hello world"/>

(which is a component where we don't want to create props for every property) currently renders like so
screen shot 2018-08-05 at 5 44 17

it would be nice to see title: "Hello world" and class: "action-bar" in the component inspector

If this is something that would be considered, I'm willing to submit a PR with the changes.

What does the proposed API look like?

N/A

@sqal
Copy link

sqal commented Aug 6, 2018

especially for functional components

but functional components are not displayed in components tab 😕

@rigor789
Copy link
Contributor Author

rigor789 commented Aug 6, 2018

@sqal #719 :)

Akryum pushed a commit that referenced this issue Jan 25, 2019
This PR fixes #734 


Co-authored-by: Guillaume Chau <alphadelta.fg@gmail.com>
simsim0709 added a commit to simsim0709/vue-devtools that referenced this issue May 7, 2019
This PR fixes vuejs#734 


Co-authored-by: Guillaume Chau <alphadelta.fg@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants