jupyterlab-cell-enhancements
Enhancements for JupyterLab 4 notebook cells:
-
Cell titles — give any cell an editable title shown above the input. Titles are stored in the cell's metadata (
cell_title) so they travel with the notebook. Hover a cell and click "Add a cell title…", or click an existing title to rename it. Press Enter to save, Esc to cancel. -
Focus mode — a corner-brackets button in the cell toolbar expands a single cell to fill the notebook, hiding everything else. Toggle the button again or press Esc to exit. Keyboard shortcut: Ctrl/Cmd + Shift + Enter while the notebook is focused.
-
Floating notes — attach a note to a whole cell, or to a specific span of text. Notes float above everything (including the sidebars), follow their anchor as you scroll, hide once it leaves the viewport, and are draggable — dragging sets an offset that stays glued to the anchor.
Notes render Markdown and LaTeX through JupyterLab's own renderer, so
**bold**, lists, code, links and$x^2$math all work.
Adding a note
| Target | How |
|---|---|
| The whole cell | Click the marker in the cell's top-right corner |
| A span of code | Select it, then right-click → Add Comment to Selection |
| Rendered markdown | Select it, then right-click → Add Comment to Selection |
| A cell output | Select it, then right-click → Add Comment to Selection |
Anchored notes highlight their text and draw a leader line to the card.
Code anchors track your edits: they're held in a CodeMirror StateField that
maps every range through each document change, so a highlight stays on its text
as you type around it. Across reloads, anchors are re-verified against the quoted
text and re-found if they've moved.
Markdown and output anchors are matched by quoted text instead, which is weaker — and note that outputs are regenerated on every run, so re-running a cell will usually orphan its output notes. Anything that can't be re-anchored is kept and flagged outdated (amber, with the original quote struck through) rather than silently pointing at the wrong place.
Resolving
Click ✓ on a note to resolve (archive) it. Resolved notes are hidden; enable Show resolved notes to bring them back, each with a ↺ to reopen.
Identity and colour
Notes are attributed using JupyterLab's own user identity, so they work without setup. Each author gets a colour generated from their name in OKLCH — any hue on the circle, with lightness and chroma constrained so the avatar text always keeps sufficient contrast. The same name yields the same colour for everyone opening the notebook.
Double-click a note's name to change it (you'll be offered the chance to update existing notes), or its avatar to pick any colour. The Notes toolbar button and the command palette expose the same options.
Storage
Everything lives in cell metadata under cell_comments — text, author, anchor,
position, and resolved state — so notes travel with the notebook and are saved
automatically shortly after any change. Notebooks written by earlier versions
(cell_comment) are read transparently and migrated on first write.
Requirements
- JupyterLab >= 4.0.0
Install
pip install jupyterlab-cell-enhancements
Uninstall
pip uninstall jupyterlab-cell-enhancements
Development install
# Clone, then from the repo root:
pip install -e .
jupyter labextension develop . --overwrite
jlpm build
Rebuild after source changes with jlpm build, or run jlpm watch in one
terminal and jupyter lab in another.
Building on a network / mapped drive (important)
This project's canonical location is on a mapped network drive (Z:), which
Node resolves to a UNC path (\\server\share\...). webpack's resolver cannot
handle UNC absolute paths, so jlpm build:prod / python -m build must be run
from a copy of the repo on a local disk (e.g. C:\...). Editing and version
control can stay on Z:; only the build/package step needs local disk. Copy the
resulting dist/*.whl (and jupyterlab_cell_enhancements/labextension/) back if
you want them alongside the source.
license-webpack-plugin patch
webpack >= 5.107 changed the ProvideSharedModule identifier separator from
= to |, which crashes license-webpack-plugin@4.0.2 during the production
build. A Yarn patch in .yarn/patches/ fixes this (wired via the resolutions
field in package.json); it is applied automatically on jlpm install.
Release files for jupyterlab-cell-enhancements 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jupyterlab_cell_enhancements-0.4.0.tar.gz | 133.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jupyterlab_cell_enhancements-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 168.2 kB
Release files / jupyterlab_cell_enhancements-0.4.0.tar.gz
| Download URL | jupyterlab_cell_enhancements-0.4.0.tar.gz |
|---|---|
| Size | 133.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7af8887de6b7273504005955f1543bca829a1049325add3389b040481c0401ef
|
|
BLAKE2b-256 checksum How to use checksums |
527df414e440e4d892301ae48d0d7df6a1263a3f84aede91632d6e4931a5b2ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / jupyterlab_cell_enhancements-0.4.0-py3-none-any.whl
| Download URL | jupyterlab_cell_enhancements-0.4.0-py3-none-any.whl |
|---|---|
| Size | 34.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d223bcf83ed08ea79971278de635d9f8e7f4e208ed7542e049afc089cdb2c801
|
|
BLAKE2b-256 checksum How to use checksums |
016cabaffe57a2105aeeb79039a173f40f5daadf02b80be5439d191445ca7d74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|