Skip to content
Draft
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3836,7 +3836,7 @@ involved in this release.

## 5.4.1

A security release to fix [CVE-2018-8768](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-8768).
A security release to fix [CVE-2018-8768](https://www.cve.org/CVERecord?id=CVE-2018-8768).

Thanks to [Alex](https://hackerone.com/pisarenko) for identifying this
bug, and Jonathan Kamens and Scott Sanderson at Quantopian for verifying
Expand Down
3 changes: 2 additions & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@
"@jupyterlab/imageviewer-extension": true,
"@jupyterlab/lsp-extension": true,
"@jupyterlab/mainmenu-extension": [
"@jupyterlab/mainmenu-extension:plugin"
"@jupyterlab/mainmenu-extension:plugin",
"@jupyterlab/mainmenu-extension:recents"
],
"@jupyterlab/markedparser-extension": true,
"@jupyterlab/mathjax-extension": true,
Expand Down
Binary file added docs/source/_static/images/recents.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions docs/source/recents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Recent Documents

The `Recents` tab on the main page lists the documents that were recently
opened, with the time they were last opened, so they can quickly be opened
again without navigating the file browser.

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

```

## The Recents tab

- Click on a document to open it in a new browser tab.
- Hover over a document and click `Forget` to remove it from the list, or use
`Forget All` to clear the list.
- The list is updated live: documents opened on other pages appear when
returning to the tab, and the refresh button re-reads the list on demand.
- Documents that no longer exist on disk are automatically removed from the
list.

## The File menu

On the notebook and editor pages, the `File > Open Recent` submenu lists the
same documents, along with a `Clear Recent Documents` entry.

## Where the list is stored

The list of recent documents is stored in the browser local storage, so it is
shared across the Jupyter Notebook pages and persists across sessions for the
same server. It is not stored on the server: clearing the browser data clears
the list, and other browsers or machines have their own list.

## Configuration

The maximum number of recent documents to keep can be configured with the
`maxNumberRecents` setting of the document manager, for example in the
settings overrides:

```json
{
"@jupyterlab/docmanager-extension:plugin": {
"maxNumberRecents": 20
}
}
```
1 change: 1 addition & 0 deletions docs/source/user-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ notebook
ui_components
notebook_7_features
pager
recents
examples/Notebook/examples_index.rst
custom_css
configuring/plugins
Expand Down
3 changes: 3 additions & 0 deletions notebook/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ def get_page_config(self) -> dict[str, t.Any]:

server_root = self.settings.get("server_root_dir", "")
server_root = server_root.replace(os.sep, "/")
# Expose the server root like JupyterLab does, so the recent documents
# can be filtered by server root
page_config.setdefault("serverRoot", server_root)
server_root = os.path.normpath(Path(server_root).expanduser())
try:
# Remove the server_root from pref dir
Expand Down
2 changes: 2 additions & 0 deletions packages/docmanager-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
"@jupyterlab/docmanager": "~4.7.0-alpha.1",
"@jupyterlab/docregistry": "~4.7.0-alpha.1",
"@jupyterlab/services": "~7.7.0-alpha.1",
"@jupyterlab/settingregistry": "~4.7.0-alpha.1",
"@jupyterlab/translation": "~4.7.0-alpha.1",
"@lumino/algorithm": "^2.0.4",
"@lumino/signaling": "^2.1.5"
},
Expand Down
Loading
Loading