Skip to content

Commit 639bd2a

Browse files
cmarmokrassowski
andauthored
Update the extension examples repo to use the latest extension template (#284)
* Update cell-toolbar * Update clap-button * Update codemirror-extension * Update command-palette * Update commands * Update completer * Update contentheader * Update context-menu * Update custom-log-console * Update datagrid * Update documents * Update hello-world * Update kernel-messaging * Update kernel-output * Update launcher * Update log-messages * Update main-menu * Update metadata-form * Update mimerenderer * Update notifications * Update react-widget * Update server-extension * Update settings * Update shout-button-message * Update signals * Update state * Update toolbar-button * Update toparea-text-widget * Update widgets * Fix README.md * Add license * Add licences * Test for ci in personal repo * revert version, change artifact name * Change name of the artifacts * Try to fix cell-toolbar test * Try to fix test * Enforce timeout * Try to fix cell-toolbar test * Update locator for test to pass * Fix for codemirror * Fix for codemirror second * Fix for custom-log-console * Fix custom-log-console, move forward codemirror * Fix conf file and documents extension * Fix Hello world readme * Fix main-menu readme * Fix server readme * Fix settings readme * Fix settings readme again * Fix some failing tests * Fix link * Update screenshots * Fix link, update screenshots. * Fix prettier * Try to fix kernel-output * Try again for kernel-output * Revert kernel output, fix toolbar-button * More fixes * Update typescript dependencies * Revert * Fix some new issues, update script with trust option * Fix codemirror and toolbar-button * Fix kernel-output * Remove `page.pause()` which led to the test hanging * Use `jp-button` over `button` * Add `mimerenderer` and `server-extension` examples to the test matrix * Add `mimerenderer` to `workspaces` list * Fix merge conflict markers * Lint `mimerenderer` * Create `yarn.lock` in `mimerenderer` * Add a timeout * Update snapshot * Fix build error as css embedding is not suppoted * Update code in README.md --------- Co-authored-by: Michał Krassowski <[email protected]>
1 parent 4585387 commit 639bd2a

File tree

205 files changed

+1240
-318
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+1240
-318
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ jobs:
3232
- log-messages
3333
- main-menu
3434
- metadata-form
35+
- mimerenderer
3536
- notifications
3637
- react-widget
38+
- server-extension
3739
- settings
3840
- shout-button-message
3941
- signals
@@ -158,7 +160,7 @@ jobs:
158160
if: steps.filter.outputs.extension == 'true' && startsWith(runner.os, 'Linux') && always()
159161
uses: actions/upload-artifact@v4
160162
with:
161-
name: ui-test-output
163+
name: ${{ matrix.example }}-ui-test-output
162164
path: |
163165
${{ matrix.example }}/ui-tests/test-results
164166
- name: Uninstall extension

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@
4646

4747
The goal of this repository is to show how to develop extensions for [JupyterLab](https://github.com/jupyterlab/jupyterlab), presented as short tutorial series.
4848

49-
**Quick start:**
50-
- Install, build, and run the `hello-world` extension example in JupyterLab by copying the code below.
51-
- This corresponds to the first three sections of the [hello-world extension tutorial](hello-world/README.md). Read these sections for additional details on what these commands are doing and how to use the JupyterLab extension template.
49+
**Quick start:**
50+
51+
- Install, build, and run the `hello-world` extension example in JupyterLab by copying the code below.
52+
- This corresponds to the first three sections of the [hello-world extension tutorial](hello-world/README.md). Read these sections for additional details on what these commands are doing and how to use the JupyterLab extension template.
5253
- Continue with the tutorial at the [Modify the extension](hello-world/README.md#modify-the-extension) section, if desired.
5354

5455
```bash

cell-toolbar/.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2-
_commit: v4.2.4
2+
_commit: v4.3.8
33
_src_path: https://github.com/jupyterlab/extension-template
44
author_email: ''
55
author_name: Project Jupyter Contributors

cell-toolbar/LICENSE

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2025, Project Jupyter Contributors
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
1. Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
2. Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
3. Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

cell-toolbar/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"files": [
1717
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
1818
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
19+
"src/**/*.{ts,tsx}",
1920
"schema/*.json"
2021
],
2122
"main": "lib/index.js",
@@ -73,7 +74,7 @@
7374
"eslint-config-prettier": "^8.8.0",
7475
"eslint-plugin-prettier": "^5.0.0",
7576
"jest": "^29.2.0",
76-
"npm-run-all": "^4.1.5",
77+
"npm-run-all2": "^7.0.1",
7778
"prettier": "^3.0.0",
7879
"rimraf": "^5.0.1",
7980
"source-map-loader": "^1.0.2",
@@ -83,7 +84,7 @@
8384
"stylelint-config-standard": "^34.0.0",
8485
"stylelint-csstree-validator": "^3.0.0",
8586
"stylelint-prettier": "^4.0.0",
86-
"typescript": "~5.0.2",
87+
"typescript": "~5.8.0",
8788
"yjs": "^13.5.0"
8889
},
8990
"sideEffects": [

cell-toolbar/pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ build-backend = "hatchling.build"
55
[project]
66
name = "jupyterlab_examples_cell_toolbar"
77
readme = "README.md"
8-
license = {text = "BSD-3-Clause License"}
9-
requires-python = ">=3.8"
8+
license = { file = "LICENSE" }
9+
requires-python = ">=3.9"
1010
classifiers = [
1111
"Framework :: Jupyter",
1212
"Framework :: Jupyter :: JupyterLab",
@@ -16,11 +16,11 @@ classifiers = [
1616
"License :: OSI Approved :: BSD License",
1717
"Programming Language :: Python",
1818
"Programming Language :: Python :: 3",
19-
"Programming Language :: Python :: 3.8",
2019
"Programming Language :: Python :: 3.9",
2120
"Programming Language :: Python :: 3.10",
2221
"Programming Language :: Python :: 3.11",
2322
"Programming Language :: Python :: 3.12",
23+
"Programming Language :: Python :: 3.13",
2424
]
2525
dependencies = [
2626
]
@@ -30,7 +30,7 @@ dynamic = ["version", "description", "authors", "urls", "keywords"]
3030
source = "nodejs"
3131

3232
[tool.hatch.metadata.hooks.nodejs]
33-
fields = ["description", "authors", "urls"]
33+
fields = ["description", "authors", "urls", "keywords"]
3434

3535
[tool.hatch.build.targets.sdist]
3636
artifacts = ["jupyterlab_examples_cell_toolbar/labextension"]

cell-toolbar/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"esModuleInterop": true,
77
"incremental": true,
88
"jsx": "react",
9+
"lib": ["DOM", "ES2018", "ES2020.Intl"],
910
"module": "esnext",
1011
"moduleResolution": "node",
1112
"noEmitOnError": true,
@@ -17,7 +18,8 @@
1718
"rootDir": "src",
1819
"strict": true,
1920
"strictNullChecks": true,
20-
"target": "ES2018"
21+
"target": "ES2018",
22+
"types": ["jest"]
2123
},
2224
"include": ["src/*"]
2325
}

cell-toolbar/ui-tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ in [jupyter_server_test_config.py](./jupyter_server_test_config.py).
1212

1313
The default configuration will produce video for failing tests and an HTML report.
1414

15-
> There is a new experimental UI mode that you may fall in love with; see [that video](https://www.youtube.com/watch?v=jF0yA-JLQW0).
15+
> There is a UI mode that you may like; see [that video](https://www.youtube.com/watch?v=jF0yA-JLQW0).
1616
1717
## Run the tests
1818

cell-toolbar/ui-tests/tests/cell_toolbar.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ test('should add buttons on code cell and markdown cell', async ({ page }) => {
88
await page.waitForSelector('text=| Idle');
99

1010
const RUN_CODE =
11-
'.jp-cell-toolbar button[data-command="toolbar-button:run-code-cell"]';
11+
'.jp-cell-toolbar jp-button[data-command="toolbar-button:run-code-cell"]';
1212
const RENDER_MD =
13-
'.jp-cell-toolbar button[data-command="toolbar-button:render-markdown-cell"]';
13+
'.jp-cell-toolbar jp-button[data-command="toolbar-button:render-markdown-cell"]';
1414

1515
await page.notebook.setCell(0, 'code', 'print("Hello, JupyterLab")');
1616
await expect(page.locator(RUN_CODE)).toBeVisible();

clap-button-message/.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2-
_commit: v4.2.4
2+
_commit: v4.3.8
33
_src_path: https://github.com/jupyterlab/extension-template
44
author_email: ''
55
author_name: Project Jupyter Contributors

0 commit comments

Comments
 (0)