Skip to content
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

Minimal notebook UI flag for vscode notebooks #5384

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

nstrayer
Copy link
Contributor

This PR adds a new mode enabled by the feature flag notebook.usePositronMinimalNotebookUI
image

The flag defaults to off.

Static changes

There are a few static visual changes:

image

Animation changes

Perhaps more important are the changes to the experience of navigating and running cells in the notebook.
Previously when you would run a cell the following animations would activate

  • Spinner in the main notebook toolbar
  • A different spinner beneath the cell
  • The cell execution-time counter
  • A bouncing progress bar above the cell.

Minimal mode removes the cell-level spinner and the bouncing progress bar to keep things a bit less hectic.

Running a cell with defaults

lots-of-animation.mov

Running cells with minimal mode

Screen.Recording.2024-11-15.at.12.43.31.PM.mov

QA Notes

This PR is almost entirely implemented via css, so there shouldn't be too many hiccups in terms of things changing. Since it's purely UI-based I held off on adding a smoke-test as that felt a bit overboard for this type of change.
Basically, after changing the feature flag, you should be able to open up any notebook you could open before and have things look a bit more... calm.

Comment on lines +76 to +77
// Old version
// const options = new NotebookOptions(mainWindow, false, undefined, instantiationService.get(IConfigurationService), instantiationService.get(INotebookExecutionStateService), instantiationService.get(ICodeEditorService));
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this commented out code be removed?

/**
* Register a callback that will be invoked when the minimal UI mode changes.
* @param opts.callback The callback to invoke.
* @param opts.runWhenFirstSet Whether to run the callback when listener is first set.
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, this is interesting. In what scenarios would we not want to run the callback immediately after setting the listener?

@dhruvisompura
Copy link
Contributor

dhruvisompura commented Nov 19, 2024

Not sure if the following is a regression from this change but I noticed that the default notebook layout has some issues:

  • If your cell only contains a single line of code. It looks like the execute button and [] under it are squished together without any margin between the two. Is this a regression or did the default notebook layout always have this issue?
  • the buttons to add additional cells (Code and Markdown) don't look to be in consistent places. I have seen the buttons within a cell, straddling between two cells, or under a cell. Is this inconsistency expected?
Screen.Recording.2024-11-18.at.5.11.36.PM.mov
Screen.Recording.2024-11-18.at.5.21.01.PM.mov

I did also try to turn the feature flag on but couldn't get the minimal ui to show. It may be user error though. I turned the feature on and then created a new jupyter project and opened it in the current window. Not sure what I did wrong there 😢

All that being said, I really love the minimal ui based off the video/screenshots in the PR description!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants