Skip to content

Commit

Permalink
Merge branch 'jupyterlab:main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
FoSuCloud authored Mar 22, 2024
2 parents da108cb + ef92af0 commit bc615fe
Show file tree
Hide file tree
Showing 82 changed files with 8,220 additions and 518 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ yarn-error.log
.pnp.*
jupyterlab/staging/.yarn/*
jupyterlab/staging/.pnp.*
jupyterlab/tests/mock_packages/test-hyphens-underscore/.yarn/*
jupyterlab/tests/mock_packages/test-hyphens-underscore/.pnp/*
jupyterlab/tests/mock_packages/test_no_hyphens/.yarn/*
jupyterlab/tests/mock_packages/test_no_hyphens/.pnp/*

# copied changelog file
docs/source/getting_started/changelog.md
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build:
os: ubuntu-22.04
tools:
python: "3.10"
nodejs: "18"
nodejs: "20"

sphinx:
configuration: docs/source/conf.py
Expand Down
2 changes: 1 addition & 1 deletion binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ channels:

dependencies:
# runtimes
- nodejs >=18,<19
- nodejs >=20,<21
- python =3.11
# package managers
- pip
Expand Down
2 changes: 1 addition & 1 deletion builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"devDependencies": {
"@types/fs-extra": "^9.0.1",
"@types/glob": "^7.1.1",
"@types/node": "^18.11.18",
"@types/node": "^20.11.27",
"@types/supports-color": "^5.3.0",
"rimraf": "~5.0.5",
"typescript": "~5.1.6"
Expand Down
6 changes: 3 additions & 3 deletions buildutils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"watch": "tsc -w --listEmittedFiles"
},
"dependencies": {
"@yarnpkg/core": "^3.0.0",
"@yarnpkg/parsers": "^2.0.0",
"@yarnpkg/core": "^4.0.3",
"@yarnpkg/parsers": "^3.0.0",
"commander": "^9.4.1",
"crypto": "~1.0.1",
"dependency-graph": "^0.11.0",
Expand All @@ -65,7 +65,7 @@
"@types/glob": "^7.1.1",
"@types/inquirer": "^9.0.3",
"@types/micromatch": "^4.0.1",
"@types/node": "^18.11.18",
"@types/node": "^20.11.27",
"@types/prettier": "~2.6.0",
"rimraf": "~5.0.5"
},
Expand Down
2 changes: 1 addition & 1 deletion dev_mode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
"worker-loader": "^3.0.2"
},
"engines": {
"node": ">=18.0.0"
"node": ">=20.0.0"
},
"jupyterlab": {
"name": "JupyterLab",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/developer/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ If you use `conda <https://conda.io>`__, you can get it with:

.. code:: bash
conda install -c conda-forge nodejs
conda install -c conda-forge nodejs=20
If you use `Homebrew <https://brew.sh>`__ on macOS:

Expand Down
9 changes: 9 additions & 0 deletions docs/source/user/running.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ re-open or focus the document linked to a given kernel or terminal:
<iframe src="https://www.youtube-nocookie.com/embed/gDM5lwU6Dmo?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>

The recently closed and currently open documents can be searched in the
modal view, which can be opened using a keyboard shortcut,
or by clicking the [↗] icon in the running sidebar.

.. image:: ../images/running-modal.png
:align: center
:class: jp-screenshot
:alt: The modal running dialog

.. _shutdown-kernel:

Kernels or terminals can be shut down from the Running panel:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@
"id": "application:toggle-side-tabbar",
"label": "Show Left Activity Bar",
"caption": "",
"shortcuts": [
"Alt 1"
]
"shortcuts": []
},
{
"id": "application:toggle-sidebar-widget",
"label": "Toggle Sidebar Element",
"caption": "",
"shortcuts": []
"shortcuts": [
"Alt 1"
]
},
{
"id": "apputils:activate-command-palette",
Expand Down Expand Up @@ -367,6 +367,12 @@
"caption": "",
"shortcuts": []
},
{
"id": "console:redo",
"label": "Redo",
"caption": "",
"shortcuts": []
},
{
"id": "console:replace-selection",
"label": "Replace Selection in Console",
Expand Down Expand Up @@ -413,6 +419,12 @@
"caption": "",
"shortcuts": []
},
{
"id": "console:undo",
"label": "Undo",
"caption": "",
"shortcuts": []
},
{
"id": "csv:go-to-line",
"label": "Go to Line",
Expand Down Expand Up @@ -514,6 +526,12 @@
"Shift F9"
]
},
{
"id": "docmanager:clear-recents",
"label": "Clear Recent Documents",
"caption": "Clear the list of recently opened items.",
"shortcuts": []
},
{
"id": "docmanager:clone",
"label": "New View for ",
Expand Down Expand Up @@ -2077,6 +2095,20 @@
"Ctrl Shift U"
]
},
{
"id": "recentmenu:open-recent",
"label": "Open a Recent Document (given by `recent` argument)",
"caption": "",
"shortcuts": []
},
{
"id": "recentmenu:reopen-last",
"label": "Reopen Closed Document",
"caption": "Reopen recently closed file or notebook.",
"shortcuts": [
"Ctrl Shift T"
]
},
{
"id": "rendermime:handle-local-link",
"label": "Handle Local Link",
Expand Down Expand Up @@ -2133,6 +2165,14 @@
"caption": "",
"shortcuts": []
},
{
"id": "running:show-modal",
"label": "Search Tabs and Running Sessions",
"caption": "",
"shortcuts": [
"Ctrl Alt A"
]
},
{
"id": "running:show-panel",
"label": "Sessions and Tabs",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 29 additions & 14 deletions galata/test/documentation/general.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -570,23 +570,38 @@ test.describe('General', () => {
await page.click('[title="Running Terminals and Kernels"]');

// Wait up to 5s for both kernels to startup
await expect(
page.locator('.jp-RunningSessions-item.jp-mod-kernel')
).toHaveCount(2, { timeout: 5000 });
await expect
.soft(page.locator('.jp-RunningSessions-item.jp-mod-kernel'))
.toHaveCount(2, { timeout: 5000 });

const freeezeKernelIds = async () => {
return page.evaluate(() => {
const mockedKernelIds = ['abcd1234', 'wxyz5678'];
document
.querySelectorAll('.jp-RunningSessions-item-label-kernel-id')
.forEach((span, i) => {
span.innerText = `(${mockedKernelIds[i]})`;
});
});
};
await freeezeKernelIds();

expect
.soft(
await page.screenshot({
clip: { y: 27, x: 0, width: 283, height: 400 }
})
)
.toMatchSnapshot('running_layout.png');

// Freeze kernel IDs
await page.evaluate(() => {
const mockedKernelIds = ['abcd1234', 'wxyz5678'];
document
.querySelectorAll('.jp-RunningSessions-item-label-kernel-id')
.forEach((span, i) => {
span.innerText = `(${mockedKernelIds[i]})`;
});
});
await page.click('jp-button[data-command="running:show-modal"]');
await freeezeKernelIds();

expect(
await page.screenshot({ clip: { y: 27, x: 0, width: 283, height: 400 } })
).toMatchSnapshot('running_layout.png');
await page
.locator('.jp-SearchableSessions-modal .jp-Dialog-content')
.screenshot()
).toMatchSnapshot('running_modal.png');
});

test('Command Palette', async ({ page }) => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 8 additions & 13 deletions galata/test/documentation/overview.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,16 @@ test.describe('Overview', () => {

await page.click('[title="Running Terminals and Kernels"]');

await page
.locator(
'.jp-RunningSessions-item.jp-mod-kernelspec >> text="Python 3 (ipykernel)"'
)
.waitFor();

// Freeze kernel ID
await page.evaluate(() => {
document.querySelector(
'.jp-RunningSessions-item-label-kernel-id'
).innerText = '(abcd1234)';
});
// Close all other sections
const otherSession = page.locator(
'#jp-running-sessions .jp-AccordionPanel-title.lm-mod-expanded:not([aria-label="Open Tabs Section"]) .lm-AccordionPanel-titleCollapser'
);
while ((await otherSession.count()) != 0) {
await otherSession.first().click();
}

expect(
await page.screenshot({ clip: { y: 27, x: 0, width: 283, height: 400 } })
await page.screenshot({ clip: { y: 27, x: 0, width: 283, height: 200 } })
).toMatchSnapshot('interface_tabs.png');
});

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"@jupyterlab/docmanager-extension:download": "Adds command to download files.",
"@jupyterlab/docmanager-extension:open-browser-tab": "Adds command to open a browser tab.",
"@jupyterlab/docmanager-extension:opener": "Provides the widget opener.",
"@jupyterlab/docmanager-extension:recents": "Provides a manager of recently opened and closed documents.",
"@jupyterlab/documentsearch-extension:plugin": "Provides the document search registry.",
"@jupyterlab/documentsearch-extension:labShellWidgetListener": "Active search on valid document",
"@jupyterlab/extensionmanager-extension:plugin": "Adds the extension manager plugin.",
Expand Down Expand Up @@ -122,6 +123,7 @@
"@jupyterlab/lsp:ILSPCodeExtractorsManager": "Provides the code extractor manager.",
"@jupyterlab/lsp-extension:tracker": "Provides the tracker of `WidgetLSPAdapter`.",
"@jupyterlab/mainmenu-extension:plugin": "Adds and provides the application main menu.",
"@jupyterlab/mainmenu-extension:recents": "Adds sub-menu for opening recent documents to the File section of the main menu.",
"@jupyterlab/markdownviewer-extension:plugin": "Adds markdown file viewer and provides its tracker.",
"@jupyterlab/markedparser-extension:plugin": "Provides the Markdown parser.",
"@jupyterlab/mathjax-extension:plugin": "Provides the LaTeX mathematical expression interpreter.",
Expand Down Expand Up @@ -153,6 +155,9 @@
"@jupyterlab/pluginmanager-extension:plugin": "Enable or disable individual plugins.",
"@jupyterlab/rendermime-extension:plugin": "Provides the render mime registry.",
"@jupyterlab/running-extension:plugin": "Provides the running session managers.",
"@jupyterlab/running-extension:sidebar": "Provides the running session sidebar.",
"@jupyterlab/running-extension:recently-closed": "Adds recently closed documents list.",
"@jupyterlab/running-extension:search-tabs": "Adds a widget to search open and closed tabs.",
"@jupyterlab/settingeditor-extension:form-ui": "Adds the interactive settings editor and provides its tracker.",
"@jupyterlab/settingeditor-extension:plugin": "Adds the JSON settings editor and provides its tracker.",
"@jupyterlab/shortcuts-extension:shortcuts": "Adds the keyboard shortcuts editor.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"@jupyterlab/debugger:IDebuggerConfig": "A service to handle the debugger configuration.",
"@jupyterlab/docmanager:IDocumentManager": "A service for the manager for all\n documents used by the application. Use this if you want to open and close documents,\n create and delete files, and otherwise interact with the file system.",
"@jupyterlab/docmanager:IDocumentWidgetOpener": "A service to open a widget.",
"@jupyterlab/docmanager:IRecentsManager": "A service providing information about recently opened and closed documents",
"@jupyterlab/documentsearch:ISearchProviderRegistry": "A service for a registry of search\n providers for the application. Plugins can register their UI elements with this registry\n to provide find/replace support.",
"@jupyterlab/filebrowser:IFileBrowserFactory": "A factory object that creates file browsers.\n Use this if you want to create your own file browser (e.g., for a custom storage backend),\n or to interact with other file browsers that have been created by extensions.",
"@jupyterlab/filebrowser:IDefaultFileBrowser": "A service for the default file browser.",
Expand Down Expand Up @@ -65,6 +66,7 @@
"@jupyterlab/pluginmanager:IPluginManager": "A canary for plugin manager presence, with a method to open the plugin manager widget.",
"@jupyterlab/rendermime:IRenderMimeRegistry": "A service for the rendermime registry for the application. Use this to create renderers for various mime-types in your extension. Many times it will be easier to create a \"mime renderer extension\" rather than using this service directly.",
"@jupyterlab/running:IRunningSessionManagers": "A service to add running session managers.",
"@jupyterlab/running:IRunningSessionsSidebar": "A token allowing to modify the running sessions sidebar.",
"@jupyterlab/settingeditor:ISettingEditorTracker": "A widget tracker for the interactive setting editor.\n Use this if you want to be able to iterate over and interact with setting editors\n created by the application.",
"@jupyterlab/settingeditor:IJSONSettingEditorTracker": "A widget tracker for the JSON setting editor.\n Use this if you want to be able to iterate over and interact with setting editors\n created by the application.",
"@jupyterlab/statusbar:IStatusBar": "A service for the status bar on the application. Use this if you want to add new status bar items.",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit bc615fe

Please sign in to comment.