From b1775126855e019481f45fe1f1cd648f2b16ebd8 Mon Sep 17 00:00:00 2001 From: martinRenou Date: Wed, 16 Oct 2024 17:43:59 +0200 Subject: [PATCH] Fix report name + output widget --- .github/workflows/ui-tests.yml | 18 +++++++++--------- packages/voila/package.json | 1 + packages/voila/src/app.ts | 4 +++- packages/widgets_manager7/src/index.ts | 8 +++++++- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml index 2ee857d9e..97ee08481 100644 --- a/.github/workflows/ui-tests.yml +++ b/.github/workflows/ui-tests.yml @@ -76,22 +76,22 @@ jobs: - name: Set test report name for progressive rendering if: always() && matrix.progressive_rendering == true run: | - echo "TEST_REPORT_NAME=progressive-voila-test-report-${{ matrix.jupyter-server-version }}" >> $GITHUB_ENV - echo "TEST_ASSETS_NAME=progressive-voila-test-assets-${{ matrix.jupyter-server-version }}" >> $GITHUB_ENV - echo "TEST_BENCHMARK_NAME=progressive-voila-test-benchmark-${{ matrix.jupyter-server-version }}" >> $GITHUB_ENV + echo "TEST_REPORT_NAME=progressive-voila-test-report-${{ matrix.jupyter-server-version }}-${{ matrix.ipywidgets }}" >> $GITHUB_ENV + echo "TEST_ASSETS_NAME=progressive-voila-test-assets-${{ matrix.jupyter-server-version }}-${{ matrix.ipywidgets }}" >> $GITHUB_ENV + echo "TEST_BENCHMARK_NAME=progressive-voila-test-benchmark-${{ matrix.jupyter-server-version }}-${{ matrix.ipywidgets }}" >> $GITHUB_ENV - name: Set test report name for non-progressive rendering if: always() && matrix.progressive_rendering == false run: | - echo "TEST_REPORT_NAME=voila-test-report-${{ matrix.jupyter-server-version }}" >> $GITHUB_ENV - echo "TEST_ASSETS_NAME=voila-test-assets-${{ matrix.jupyter-server-version }}" >> $GITHUB_ENV - echo "TEST_BENCHMARK_NAME=voila-test-benchmark-${{ matrix.jupyter-server-version }}" >> $GITHUB_ENV + echo "TEST_REPORT_NAME=voila-test-report-${{ matrix.jupyter-server-version }}-${{ matrix.ipywidgets }}" >> $GITHUB_ENV + echo "TEST_ASSETS_NAME=voila-test-assets-${{ matrix.jupyter-server-version }}-${{ matrix.ipywidgets }}" >> $GITHUB_ENV + echo "TEST_BENCHMARK_NAME=voila-test-benchmark-${{ matrix.jupyter-server-version }}-${{ matrix.ipywidgets }}" >> $GITHUB_ENV - name: Upload Playwright Test assets if: always() uses: actions/upload-artifact@v4 with: - name: ${{ env.TEST_ASSETS_NAME }}${{ matrix.ipywidgets }} + name: ${{ env.TEST_ASSETS_NAME }} path: | ui-tests/test-results @@ -99,7 +99,7 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: ${{ env.TEST_BENCHMARK_NAME }}${{ matrix.ipywidgets }} + name: ${{ env.TEST_BENCHMARK_NAME }} path: | ui-tests/benchmark-results @@ -107,7 +107,7 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: ${{ env.TEST_REPORT_NAME }}${{ matrix.ipywidgets }} + name: ${{ env.TEST_REPORT_NAME }} path: | ui-tests/playwright-report diff --git a/packages/voila/package.json b/packages/voila/package.json index 10b4b0d6e..ea31cfa82 100644 --- a/packages/voila/package.json +++ b/packages/voila/package.json @@ -11,6 +11,7 @@ }, "browserslist": ">0.8%, not ie 11, not op_mini all, not dead", "dependencies": { + "@voila-dashboards/widgets-manager8": "^0.5.7", "@jupyterlab/application": "^4.0.0", "@jupyterlab/apputils": "^4.0.0", "@jupyterlab/apputils-extension": "^4.0.0", diff --git a/packages/voila/src/app.ts b/packages/voila/src/app.ts index 325427e66..7d643364b 100644 --- a/packages/voila/src/app.ts +++ b/packages/voila/src/app.ts @@ -10,6 +10,8 @@ import { PageConfig } from '@jupyterlab/coreutils'; import { IRenderMime } from '@jupyterlab/rendermime'; +import type VoilaWidgetManager from '@voila-dashboards/widgets-manager8'; + import { IShell, VoilaShell } from './shell'; const PACKAGE = require('../package.json'); @@ -123,7 +125,7 @@ export class VoilaApp extends JupyterFrontEnd { return this._widgetManagerPromise; } - set widgetManager(manager: any) { + set widgetManager(manager) { this._widgetManager = manager; if (this._widgetManager) { this._widgetManagerPromise.resolve(this._widgetManager); diff --git a/packages/widgets_manager7/src/index.ts b/packages/widgets_manager7/src/index.ts index 2c6a45707..4f1334257 100644 --- a/packages/widgets_manager7/src/index.ts +++ b/packages/widgets_manager7/src/index.ts @@ -20,7 +20,7 @@ import { StyleView } from '@jupyter-widgets/base'; import { JUPYTER_CONTROLS_VERSION } from '@jupyter-widgets/controls/lib/version'; -import { WidgetRenderer } from '@jupyter-widgets/jupyterlab-manager'; +import { WidgetRenderer, output } from '@jupyter-widgets/jupyterlab-manager'; import { JupyterFrontEnd, JupyterFrontEndPlugin @@ -168,6 +168,12 @@ const widgetManager: JupyterFrontEndPlugin = { } }); + manager.register({ + name: '@jupyter-widgets/output', + version: output.OUTPUT_WIDGET_VERSION, + exports: output as any + }); + app.started.then(async () => { await manager._loadFromKernel(); });