Skip to content

Improve single document mode to address classic notebook usage cases#8531

Merged
vidartf merged 8 commits into
jupyterlab:masterfrom
ellisonbg:sdm1
Jun 23, 2020
Merged

Improve single document mode to address classic notebook usage cases#8531
vidartf merged 8 commits into
jupyterlab:masterfrom
ellisonbg:sdm1

Conversation

@ellisonbg

Copy link
Copy Markdown
Contributor

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:

jlab-sdm

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.

@jupyterlab-dev-mode

Copy link
Copy Markdown

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

@ellisonbg

Copy link
Copy Markdown
Contributor Author

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.

@github-actions github-actions Bot added tag:Design System CSS If a PR is editing any CSS files please add this tag for design team to review. pkg:application pkg:apputils pkg:console pkg:mainmenu tag:CSS For general CSS related issues and pecadilloes labels Jun 8, 2020
@telamonian

telamonian commented Jun 8, 2020

Copy link
Copy Markdown
Member

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

  • "single-document mode" is a more honest descriptor; it would at least start out as "just the single document, nothing else"
  • we'd get greater similarity in layout with nb classic, while still retaining muted touches of jlab (eg the sidebars themselves will still be visible)

Comment thread packages/application/src/shell.ts Outdated
Comment thread packages/application/style/titlepanel.css Outdated
Comment thread packages/mainmenu-extension/style/index.css Outdated
This comment changes how the SDM title panel is updated. It now follows the currentWidget (rather than the active) and handles document renames.
@ellisonbg

Copy link
Copy Markdown
Contributor Author

All review comments addressed and additional improvements to document renaming.

@blink1073 blink1073 added this to the 3.0 milestone Jun 15, 2020

@blink1073 blink1073 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! I'll leave this open for a day in case anyone else has comments.

@telamonian

Copy link
Copy Markdown
Member

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):

  • on initial page load/reload, regardless of previous state:
    • if in SD mode, left sidebar is collapsed
    • if in normal mode, left sidebar is expanded
  • otherwise, the left sidebar ignores document mode and only expands/collapses when a sidebar tab is directly clicked (same as previous behavior)

Ideally, the side bars would instead:

  • remember their most recent state wrt to each document mode, and restore said expand/collapse state on document mode switch
  • restore to immediate prior state on page reload

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.

@ellisonbg

Copy link
Copy Markdown
Contributor Author

@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?

@vidartf vidartf merged commit 2eb45f0 into jupyterlab:master Jun 23, 2020
@wolfv

wolfv commented Jul 27, 2020

Copy link
Copy Markdown
Member

Did this get an UX/UI review?
We just hit the problem where jupyterlab dev mode was started in single-view mode and we didn't know how to get out of it / that we were in it.

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.
Right now it's super-hidden.

@jasongrout jasongrout mentioned this pull request Dec 23, 2020
43 tasks
@github-actions github-actions Bot added the status:resolved-locked Closed inactive issues are locked after a while. Please open a new issue for related discussion. label Feb 7, 2021
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Feb 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

pkg:application pkg:apputils pkg:console pkg:mainmenu status:resolved-locked Closed inactive issues are locked after a while. Please open a new issue for related discussion. tag:CSS For general CSS related issues and pecadilloes tag:Design System CSS If a PR is editing any CSS files please add this tag for design team to review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants