Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"@jupyterlab/hub-extension": "~4.5.0-alpha.3",
"@jupyterlab/imageviewer": "~4.5.0-alpha.3",
"@jupyterlab/imageviewer-extension": "~4.5.0-alpha.3",
"@jupyterlab/inspector-extension": "~4.5.0-alpha.3",
"@jupyterlab/javascript-extension": "~4.5.0-alpha.3",
"@jupyterlab/json-extension": "~4.5.0-alpha.3",
"@jupyterlab/logconsole-extension": "~4.5.0-alpha.3",
Expand Down Expand Up @@ -160,6 +161,7 @@
"@jupyterlab/htmlviewer-extension": "~4.5.0-alpha.3",
"@jupyterlab/hub-extension": "~4.5.0-alpha.3",
"@jupyterlab/imageviewer-extension": "~4.5.0-alpha.3",
"@jupyterlab/inspector-extension": "~4.5.0-alpha.3",
"@jupyterlab/javascript-extension": "~4.5.0-alpha.3",
"@jupyterlab/json-extension": "~4.5.0-alpha.3",
"@jupyterlab/logconsole-extension": "~4.5.0-alpha.3",
Expand Down Expand Up @@ -292,6 +294,9 @@
"@jupyterlab/htmlviewer-extension": true,
"@jupyterlab/hub-extension": true,
"@jupyterlab/imageviewer-extension": true,
"@jupyterlab/inspector-extension": [
"@jupyterlab/inspector-extension:inspector"
],
"@jupyterlab/lsp-extension": true,
"@jupyterlab/mainmenu-extension": [
"@jupyterlab/mainmenu-extension:plugin"
Expand Down Expand Up @@ -403,6 +408,7 @@
"@jupyterlab/fileeditor",
"@jupyterlab/htmlviewer",
"@jupyterlab/imageviewer",
"@jupyterlab/inspector",
"@jupyterlab/lsp",
"@jupyterlab/mainmenu",
"@jupyterlab/markdownviewer",
Expand Down
Binary file added docs/source/_static/images/pager.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 77 additions & 0 deletions docs/source/pager.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Contextual Help (Pager)

The Contextual Help (also known as the pager) is a feature that displays help documentation and function signatures when you request them in a Jupyter Notebook cell. It provides a convenient way to view documentation without leaving your current context.

```{image} ./_static/images/pager.png

```

## What is the Pager?

The pager displays help content such as:

- Function docstrings and signatures
- Object information
- Module documentation
- Any content typically shown by Python's `help()` function or IPython's `?` and `??` operators

## Default Behavior

By default, the notebook pager opens documentation in the **down area** at the bottom of the notebook interface. This behavior is inherited from the classic Jupyter Notebook interface and keeps your main notebook view uncluttered while providing easy access to help content.

When you use help commands like:

```ipython
# Show help for a function
help(print)

# IPython magic for quick help
print?

# Detailed help with source code
print??
```

The documentation will appear in the collapsible panel at the bottom of the notebook page.

## Configuration Options

You can customize the pager behavior through the notebook settings:

### Opening Help in Different Areas

The pager behavior is controlled by the `openHelpInDownArea` setting:

- **`true` (default)**: Help content opens in the down area
- **`false`**: Help content displays inline within the cell output (like in JupyterLab)

### How to Change the Setting

1. **Via Settings Menu**: Navigate to Settings → Advanced Settings Editor → Notebook
2. **Via Configuration File**: Add the following to your notebook configuration:

```json
{
"@jupyter-notebook/notebook-extension:pager": {
"openHelpInDownArea": false
}
}
```

### Switching to the JupyterLab behavior

If you prefer the JupyterLab approach where help content appears inline with your cell outputs, set `openHelpInDownArea` to `false`. This will display help content directly below the cell that requested it, similar to regular cell output.

Each mode has its own benefits.

**With the Down Area (Default)**

- **Persistent**: Help content stays visible while you work on other cells
- **Organized**: Keeps main notebook area clean and focused
- **Familiar**: Matches classic Jupyter Notebook behavior

**Inline Output**

- **Contextual**: Help appears directly where you requested it
- **JupyterLab-compatible**: Familiar to JupyterLab users
- **Self-contained**: Each cell's help is contained within its output
1 change: 1 addition & 0 deletions docs/source/user-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Use this page to navigate to different parts of the user documentation.
notebook
ui_components
notebook_7_features
pager
examples/Notebook/examples_index.rst
custom_css
configuring/plugins
Expand Down
3 changes: 2 additions & 1 deletion packages/application-extension/schema/shell.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"title": "Customize shell widget positioning",
"description": "Overrides default widget position in the application layout",
"default": {
"Inspector": { "area": "down" },
"Markdown Preview": { "area": "right" },
"Plugins": { "area": "left" }
}
Expand All @@ -24,7 +25,7 @@
"type": "object",
"properties": {
"area": {
"enum": ["left", "right"]
"enum": ["left", "right", "down"]
}
},
"additionalProperties": false
Expand Down
6 changes: 6 additions & 0 deletions packages/application/src/shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,12 @@ export class NotebookShell extends Widget implements JupyterFrontEnd.IShell {
} else if (area === 'right') {
this.expandRight(id);
} else if (area === 'down') {
const tabIndex = this._downPanel.tabBar.titles.findIndex(
(title) => title.owner.id === id
);
if (tabIndex >= 0) {
this._downPanel.currentIndex = tabIndex;
}
this._downPanel.show();
widget.activate();
} else {
Expand Down
1 change: 1 addition & 0 deletions packages/notebook-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"@jupyterlab/apputils": "~4.6.0-alpha.3",
"@jupyterlab/cells": "~4.5.0-alpha.3",
"@jupyterlab/docmanager": "~4.5.0-alpha.3",
"@jupyterlab/inspector": "~4.5.0-alpha.3",
"@jupyterlab/notebook": "~4.5.0-alpha.3",
"@jupyterlab/settingregistry": "~4.5.0-alpha.3",
"@jupyterlab/translation": "~4.5.0-alpha.3",
Expand Down
14 changes: 14 additions & 0 deletions packages/notebook-extension/schema/pager.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"title": "Jupyter Notebook Pager Settings",
"description": "Settings for controlling pager/help display behavior",
"properties": {
"openHelpInDownArea": {
"type": "boolean",
"title": "Open Help in Down Area",
"description": "Whether to open help/documentation in the inspector panel (down area) or display it inline in the cell output",
"default": true
}
},
"additionalProperties": false,
"type": "object"
}
Loading
Loading