-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
[inspector] Show parent class hierarchy when inspecting a class #272
Conversation
A third option would be to show all the transitive parents but as a flat list (without indentation). Not as pretty, but then we can for example give it is a clickable list that the user can click to go inside and then inspect as a regular sequence. A fourth option is to keep the tree but show only part of it, and then make it clickable to see hierarchy as a nested map. Kinda like datafying the whole hierarchy. Compact, but would involve many more clicks to get to the thing you want to inspect. |
Thanks for offering options!
My thinking is that it's useful info that allows one to further inspect stuff - hiding it would make it less likely that users would discover/inspect these pieces of info. |
Cool! Going with the hierarchy then. Side question: do you think we should include Object as a superclass? On one hand, it doesn't provide much "information" that a class extends an Object, on the other hand, it feels a bit weird to exclude it synthetically. |
Actually, it serves a purpose: we currently don't show anyhow that an inspected class is a class or an interface. Having |
56f2a5d
to
a5b94a3
Compare
SGTM! |
04906c4
to
eddb2b6
Compare
Finally got the tests to pass. It is a pain to come up with an example of a class that is both interesting and stays stable across different Clojure and Java versions. Hopefully this one will last for some time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
eddb2b6
to
31ed277
Compare
31ed277
to
0677187
Compare
This PR has two implementations: a boring one and a fun one. Let's first decide which one to continue with, and then I'll take care of the tests.
Care is taken to sort only the interfaces (like we currently do) but the superclass will always stay on top.
I like the fun one better because it gives much more information at a glance. You can discover with surprise that a certain class transitively implements an interface. You can immediately click the interface or class that you want. The only downside I see is that the tree steals a lot of space at the top of the inspector window, so if people primarily use class inspection to see fields/methods (which they usually do), it may be annoying having to scroll down to those sections now.