-
-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI modes #781
Conversation
src/main/labview/labview.ts
Outdated
await this._view.webContents.executeJavaScript(` | ||
executeJSResult_currentLayout = {}; | ||
{ | ||
const lab = window.jupyterapp || window.jupyterlab; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should make the code below into a proper Jupyter extension and make it expose a single command on the window, like window.setJupyterLabMode('zen' | 'multi' | 'single')
. This would ensure that as we update versions the type validation catches any changes, and allow re-using it elsewhere. This could be an extension or set of extensions in this repo, or even plugins which might be disabled by default in jupyterlab repo.
My main motivation would be to ultimately revert the change which exposed jupyterapp
on window e.g. to avoid users writing logic which assumes that it is there (it will not be available outside of Desktop).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that makes sense. I was also thinking about exposing desktop API endpoints (something like window.jlabDesktopApp.), so that extensions can use. I will create a separate issue for such refactoring.
Looks amazing btw! |
Adds UI mode switch to session menu. UI mode is saved per project (working directory).
Zen Mode is the simplified Single document mode. It is an alternative to Classic Notebook view.
Custom mode is the default mode that comes with JupyterLab and restores user's layout configuration. Other modes reset the layout based on the selection whenever a new session is created.
Introduce UI modes
Make Zen Mode default for opening single notebook files by double clicking or from CLI
Expose UI modes in settings dialog and CLI
cc. @bollwyvl I looked into supporting Jupyter Notebook mode but it was not feasible. It didn't seem to worth the effort. The Zen Mode introduced in this PR is a good alternative for Classic Notebook view fans.