-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
DevTools: An easier way to see all siblings #16463
Comments
Hi all. I wonder why it hasn't acquired appropriate interest from the community or developers. It seems like you folks don't really use this extension, otherwise you'd understand how bad we're lacking this feature. As Dan said, landing in the middle of nowhere is just a regular situation when you use "Select an element to inspect" function and get to some element in the big tree. Alternative 1 I see one alternative to what @gaearon has suggested: consider collapsing everthing else. E.g. before:
after:
Alternative 2 There was one more issue reported about the same problem: #16735 reported by @zinoviev For some reason it has been closed w/o resolution, yet the proposition was quite clever and also solved the issue effectively. The suggestion was to collapse recursively when you're collapsing nodes. This way, to achieve the picture above, you would need to go to the root node once, collapse it, and then identify an element of your interest: to this point the other nodes are already collapsed. Recursive collapsing is implemented for example in the JetBrains IDEs: AndroidStudio, IntelliJ, WebStorm, PhpStorm, PyCharm etc. It's much more convenient than having nodes to keep their expanded state when you collapse their ancestors. |
Sounds like you're volunteering to do this work, @OnkelTem? |
@bvaughn Maybe :) I haven't looked into the code yet. |
Well, I like Igor's proposition too. But how to do it properly is not clear yet. For example, this is how Chrome DevTools Elements tab works:
In my opinion the best thing to do would be to create the context menu in the first place. Then we can implement any view transform tactics using it. |
I have a particular pattern that I struggle with when navigating deep trees in devtools: I want to see all siblings of a node together.
Say I'm in the middle of something and I wonder what are all nodes on the same level. It's super hard to actually get to that state. I wonder if we could tweak "left" button to do that as an intermediate state.
Maybe this is too crazy :-) Or maybe there's another mechanic that can achieve the same effect. The goal here is to be able to make sense of the tree structure by going upwards. Currently implementation details of children prevent me from seeing it. (At least, with the "expand" mode on — which is now on by default.)
Originally reported by @gaearon via bvaughn/react-devtools-experimental#384
The text was updated successfully, but these errors were encountered: