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

On Components and Vuex tab, make 'Collapse All' also collapse children of state, getters and mutations #689

Closed
gtarsia opened this issue May 21, 2018 · 0 comments

Comments

@gtarsia
Copy link

gtarsia commented May 21, 2018

What problem does this feature solve?

celeryman

The 'Collapse All' action (Cmd Click in MacOS) only collapses the top level elements (props, data, etc. for Components, state, getters, etc. for Vuex). It doesn't collapse their children.

The usefulness of this is very limited because:
It only takes me three easy clicks to collapse these top level elements manually, whereas collapsing their children takes more than 10 clicks; for example, when I have more than 10 getters across my stores, which a reasonable and likely scenario.
Someone could argue that collapsing the top level elements manually is clumsy, that it would require you to scroll to the top to do that. Which is true, but that is also true for the 'Collapse All' action; it only works when you click any of the top level elements, which means the easiest way to collapse all using it would be to scroll to the top, then doing the 'Collapse all' click on the first top level element, pretty much the same as doing it manually, just 1 click instead of 3/4.

I propose replacing this collapsing behaviour to either.
a) Collapse just the children of top level elements
b) Collapse both top level elements and their children

I also think it might makes more sense change the functionality and name of this to just 'Collapse element', and just cause any of these effects to the actual target elements (or any of their children), and not to all top level elements.
Also including the 'Collapse all' as a button outside, at the top of the tree makes more sense to me, since you're targeting all elements, it shouldn't be triggered on single elements.

I could get into the code and try to post an MR if it was required.

What does the proposed API look like?

I don't know, this is for devtools.

@gtarsia gtarsia changed the title On Components and Vuex tab, make 'Collapse All' also collapse children of state, getters and mutation. On Components and Vuex tab, make 'Collapse All' also collapse children of state, getters and mutations May 21, 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

2 participants