JupyterLab 4.1 and Notebook 7.1 are here 🎉

Project Jupyter
Jupyter Blog
Published in
6 min readFeb 26, 2024

--

JupyterLab 4.1 and Notebook 7.1 are now available! These releases include several new features, bug fixes, and enhancements for extension developers. This release is compatible with extensions supporting JupyterLab 4.0 and Notebook 7.0.

JupyterLab 4.1 is one of the largest minor releases of JupyterLab to date, bringing 6 new features, 39 enhancements, and 114 bug fixes to users, and addressing 140 maintenance tasks. Project Jupyter thanks the 70 contributors, including 13 new code/documentation contributors, who helped us build this new version.

Jupyter Notebook 7.1 is the first minor release after the transition to the new codebase, which re-uses JupyterLab components. As such, Notebook 7.1 inherits many of the new features and fixes from JupyterLab 4.1. Feature parity with Notebook 6 was also improved in this release.

JupyterLab Desktop was also upgraded to version 4.1, receiving additional bug fixes and enhancements. Thank you to Mehmet Bektas for your continuing work to improve JupyterLab Desktop!

Extension authors should consult the Extension Migration Guide, which lists deprecations and changes to the public API.

Custom CSS

JupyterLab now supports automatic loading of custom CSS. Themes are the recommended way for customizing the JupyterLab look and feel, while custom CSS is intended for minor personal adjustments.

To opt in, start JupyterLab with the — custom-css flag. The location of the custom.css file is documented in the section on customizing the user interface. Please note that the CSS selectors may vary between versions and applications (JupyterLab vs Notebook).

Diagrams in Markdown

Matching GitHub-Flavoured Markdown, JupyterLab and Notebook now support Mermaid diagrams. To create a Mermaid diagram, use the mermaid language specifier for a code block in a markdown cell or document, for example:

which renders as:

Inline code completion

JupyterLab and Notebook now support automatic code (and text) completion presented as ghost text in the cell and file editors, allowing generative AI models to provide multi-line completions. The suggestions are provided by plugins implementing the IInlineCompletionProvider API. By default a single provider using the user’s kernel history is available.

The suggestions can be invoked as-you-type or manually using a configurable shortcut (by default Alt + \). The default keyboard shortcuts are displayed in the small widget shown when hovering over the ghost suggestion.

To enable the inline suggestions based on the kernel history, go to Settings → Settings Editor → Inline Completer → History provider → check the “enabled” checkbox.

In addition to the built-in history suggestions, additional inline completion providers can be installed. For example, the jupyter-ai extension, version 2.10.0 and newer, provides suggestions from compatible large language models.

The Inline Completer API is still considered experimental and may be subject to change. Please share your feedback!

Keyboard navigation improvements

Numerous improvements to keyboard navigation with focus on accessibility and usability are included in this release:

  • the notebook cells now retain focus
  • the focus can now be moved beyond the active notebook
  • the toolbars can now be navigated using arrow keys

For more details, see the post on the Jupyter Blog about keyboard navigation improvements.

Execution history in notebook

The code from previously executed cells can be used to populate empty cells, letting users iterate on code from previous cells or even previous sessions, depending on how a specific kernel stores its history.

To cycle between history items, press Alt + Arrow Up and Alt + Arrow Down.

To enable execution history, go to Settings Editor → Notebook → check the “Kernel history access” checkbox.

This feature was already available in the console in previous releases; it only works with kernels supporting execution history requests. To clear the execution history, consult the documentation of the kernel you are using (e.g., IPython/ipykernel).

Opening files from tracebacks

Paths to code files detected in error tracebacks are now turned into links. These links will open the corresponding file for editing, if it is in the Jupyter root directory, or they will open a read-only preview if the file is outside of the root directory and the active kernel supports the debugger.

Error indicator in the table of contents

When a cell fails during execution, an error indicator will be displayed by the corresponding heading, increasing awareness of the notebook state and enabling users to quickly navigate to the cell which requires attention.

Plugin Manager

Individual plugins can now be disabled or enabled from a new Plugin Manager user interface. While the existing extension manager can enable/disable entire extensions, each extension is composed of one or more plugins (and plugins form the basis of JupyterLab itself) thus the plugin manager enables more extensive customization of the JupyterLab experience in addition to the previously available extension manager.

This feature is intended for advanced users and is documented in depth in the documentation.

Administrators may want to lock specific plugins if they are required for any reason; this will prevent users from disabling the plugins via Plugin Manager and remote API calls. The Plugin Manager itself can be disabled using the CLI.

Virtual scrollbar for notebook in windowed mode

The windowed notebook now has an optional scrollbar that shows the active cell and selected cells. Users can jump to a specific cell.

To enable the virtual scrollbar, go to Settings → Notebook → Windowing mode, choose “full”, and click on the hamburger icon (≡) which appears in the notebook’s toolbar.

Virtual scrollbar is an experimental feature. Please share your feedback!

Notifications

JupyterLab 3.6 added a notification center which so far was only used for announcements and version update notifications (both opt-in). JupyterLab 4.1 adds two notifications to guide users in potentially confusing situations:

  • when a user attempts to save a read-only document, a transient notification suggesting using “save as” is displayed
  • when a user attempts to execute a cell before a slow-starting kernel has initialized, a notification is shown to indicate that the cell cannot be yet executed (this is opt-in and needs to be enabled in settings)

Full notebook windowing mode improvements

Notebooks in the full windowing mode only render the visible cells, significantly improving the performance of the application. Numerous improvements for the full windowing mode behavior (such as scrolling, search, rendering, and navigation) are included in this release (see the list of issues in #15258 for details). Note: the windowing mode is still experimental and known issues remain to be solved.

Search improvements

  • The search box will now grow automatically to accommodate longer text
  • Search in selection can now be toggled using Alt + L and automatic search in selection can be configured in settings
  • Tooltips with shortcuts were added to the buttons in the search box to improve discoverability of the shortcuts

Acknowledgements

Special shout out to new code/documentation contributors (hope to see you again!):

  • JupyterLab: @alden-ilao @AllanChain @ashna1jain @brijsiyag @DcWire @DenisaCG @Deepali1211 @dhml @dolevf @eliaslma @emmanuel-ferdman @e4e @g547315 @jans-code @j264415 @kiliansinger @KiranmaiKalla @misterfads @mmichilot @mdengler @MFA-X-AI @m158261@nbowditch-einblick @nluetts @paolocarinci @pauky @paulkim3151 @phil-zxx @Rmarieta @RRosio @Sarthug99 @sinistersnare @t03857785 @Wh1isper
  • Notebook: @Dilip-Jain @haok1402 @akx

Thank you to the returning contributors (please do feel invited to review pull requests as well!):

  • JupyterLab: @afshin @akx @andrewfulton9 @andrii-i @bollwyvl @bikash30851 @brichet @davidbrochart @divyansshhh @dharmaquark @DonJayamanne @echarles @ericsnekbytes @fcollonval @firai @FoSuCloud @gabalafou @hbcarlos @JasonWeill @jtpio @krassowski @mctoohey @minrk @nishikantparmariam @parmentelat @skyetim @smacke @SylvainCorlay @telamonian @tibdex @timkpaine @trungleduc @yuvipanda
  • Notebook: @brichet @jtpio

and everyone who tested the pre-releases!

Additionally, we would like to thank our community triage leaders who helped sort issues for JupyterLab (@JasonWeill), Notebook (@RRosio) and JupyterLab Desktop during the course of weekly triage meetings.

Contributors to this blog post: @JasonWeill @krassowski @gabalafou @jtpio

--

--

Project Jupyter exists to develop open-source software, open standards, and services for interactive and reproducible computing.