Improve single document mode to address classic notebook usage cases#8531
Conversation
|
Thanks for making a pull request to JupyterLab! To try out this branch on binder, follow this link: |
|
I should note, there are a ton of other things we will want to do to improve single document mode, this PR is only meant to get us going. I will open an issue to track the bigger picture. @afshin @vidartf @blink1073 and others who are interested in this work. |
|
I dig your new header styling. Should seem very welcoming to existing nb classic users. Suggestion: single-document mode should keep its own separate "memory" of the sidebar state, which should default to no sidebars widgets showing. That way
|
This comment changes how the SDM title panel is updated. It now follows the currentWidget (rather than the active) and handles document renames.
|
All review comments addressed and additional improvements to document renaming. |
blink1073
left a comment
There was a problem hiding this comment.
LGTM, thanks! I'll leave this open for a day in case anyone else has comments.
|
Overall, LGTM! My only nit is that the current expand/collapse behavior for the left sidebar is a bit confusing. Current behavior (with this PR):
Ideally, the side bars would instead:
If that's too much for this PR, I think a good/simple place to start would be to just have the sidebar collapse on switch into SD mode, and expand on switch into normal mode, just like how the sidebar behaves right now in this PR on mode toggle + page reload. |
|
@telamonian I think we should follow up in subsequent PRs to address the left panel layout state. I have a separate PR underway that is diving into how document mode and layout restoration interplay. Can we merge this? |
|
Did this get an UX/UI review? It would be great to have an indicator that one is in a special mode and maybe have a button next to the enlarged title to go back to "normal". Or in the tab manager, one could have a button to switch to multi-doc mode. |
This is a beginning to improve JupyterLab's single document mode to address the usage cases of the classic notebook. In particular, this PR simplifies the single document layout and adds a document title header to the page. The user can switch from the normal JupyterLab layout (which we call multiple document mode) to this single document mode using Command+Shift+D or the View menu. The result is a user experience that is closer to the intent of the classic notebook by being more "document oriented." Here is an animated GIF of the transition:
References
#8292
Code changes
Adds a new title panel to the overall layout of the shell, between the header and top panels. Currently, this is a private shell panel, with no public extension points.
Backwards-incompatible changes
None.