Hierarchical notebook listing #2982

Closed
wants to merge 3 commits into
from

Projects

None yet

3 participants

@robyoung

Add the ability to save notebooks in subdirectories under the main notebook directory. Slashes in the notebook name are converted to directory separators, the notebook file name is the last part of the notebook name. On the notebook list view directories are displayed like notebooks but with a + or - to their left. When clicked they expand to show their contents.

@robyoung

Original in #2982

@minrk minrk commented on the diff Mar 29, 2013
IPython/frontend/html/notebook/filenbmanager.py
return names
+ def _find_files(self, path):
+ """Recursively find all files in a path."""
+ result = []
@minrk
minrk Mar 29, 2013

this can just use os.walk, and it should probably be curtailed by a maximum depth (probably something simple like two or three), since the notebook-dir can have an arbitrarily large number of nested directories in it.

@minrk
IPython member

I don't want to get too detailed into review of this unless @ellisonbg is on board, but I think this is actually rather nice, and not especially disruptive. It doesn't add anything like the navigation that we really do need to implement, it just allows expressing nested notebooks with the FileNB manager, in a single flat list where the HTML UI is a simple tree based on splitting '/' in the listed names.

That said, we need to figure out exactly what our navigation is going to look like, in case this notion actually conflicts with that - if it does, we are better off waiting, but it may not.

@ellisonbg
IPython member
@ellisonbg
IPython member

@robyoung Hi! here is what I would like to do on this PR.

Both you and Zach (@Zsailer) have been working on this and I want to see if we can combine your work. Here is my current idea on how to do that.

Zach has created an IPEP here:

https://github.com/ipython/ipython/wiki/IPEP-16%3A-Notebook-multi-directory-dashboard-and-URL-mapping

that is helping us to work through the URL scheme for the multiple directories. Please help us with that discussion (this discussion is on the ipython-dev list).

Once we finish this discussion, I would like Zach to implement all of that from the server side of things (in the notebook manager and handlers). I will probably have him pull some of your server side code into that if it makes sense. Once that is done I would like to see if you can adapt what you have done here on the frontend to the server changes. It is a little challenging when multiple people have been working on something, but this is (I think) both of your first contributions to IPython, so I would love to keep you both going on this.

@ellisonbg
IPython member

I should note a few things about our thinking on the UI/UX side of the multidirectory support. We are thinking that each dashboard would like the notebooks in the dir along with any subdirs. Clicking on the subdir would open the dashboard for that subdir - basically the same as GitHub.

@ellisonbg
IPython member

I am going to close this PR for now and post a link to it from issue #3166 that has been opened to track this work. We will finish the design under that issue and use this as a ref and reopen if needed.

@ellisonbg
IPython member

Closing

@ellisonbg ellisonbg closed this Apr 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment