jupyterlab-contrib / jupyterlab-variableInspector

Variable Inspector extension for Jupyterlab
BSD 3-Clause "New" or "Revised" License
1.1k stars 95 forks source link

Design: table vs treeview #33

Open fcollonval opened 6 years ago

fcollonval commented 6 years ago

I'd like to start a discussion about the layout to use. I fully understand why Matlab-like softwares use table like layout as they focus on values and originally do not have object-oriented data structure. But this is not the case in general for Python and lots of other languages. So a tree view, like the one used in Pycharm could be a more general solution. variables pane

In particular, basic types are directly seen in the tree. And array can be seen in details in side panels as you have done. The object attributes will be looked for only when the user is expanding the object leaf.

8bit-pixies commented 6 years ago

Yes, this is very similar to the RStudio variable explorer as well, where objects can be expanded. I'll leave for lckr to give their view. I think its something we can implement into the future, with an eye on how we might do it (basically its picking up the dir output of everything variable).

My personal view is that although valuable, it is probably less valuable than:

Of course if you know how to extend it yourself, I would absolutely encourage you to submit a PR.

lckr commented 6 years ago

I think it is a good idea to provide a way to further inspect objects in the explorer. We would have to think about how to provide such a method in a language independent way, i.e., that is not tailored towards one specific lang but usable in all supported languages.

But I also agree with @chappers, that this is not our immediate focus.

fcollonval commented 6 years ago

Thanks for the feedback.

On the front for multi languages support, there is some work on the jupyter core to test VS Code protocol for debugging - and so inspect variables. It maybe worth trying connecting the dots.

Here is the link https://github.com/jupyter/debugger/blob/master/README.md

8bit-pixies commented 6 years ago

Given who we are in this project, I doubt we have the clout to influence future architectural decisions related to Jupyter...

Since that project is talking about large architectural decisions (potentially breaking this extension + many other extensions) and roadmaps years down the track - I'll be leaving it alone for now.