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.
Allow subdirectories in notebook path.
Extract append_or_replace method.
Add basic hierarchical notebook list.
Original in #2982
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.
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.
@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:
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.
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.
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.