Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed all jupyterlab-manager plugins #1396

Merged
merged 2 commits into from
Sep 15, 2023
Merged
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 .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
python-version: [3.8]
node-version: [16.x]
node-version: [18.x]
fail-fast: false

steps:
Expand Down
12 changes: 5 additions & 7 deletions packages/voila/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ import {

//Inspired by: https://github.com/jupyterlab/jupyterlab/blob/master/dev_mode/index.js

const disabled = [
'@jupyter-widgets/jupyterlab-manager:plugin',
'@jupyter-widgets/jupyterlab-manager:saveWidgetState'
];

/**
* The main function
*/
Expand All @@ -44,6 +39,9 @@ async function main() {
require('@jupyterlab/rendermime-extension'),
require('@jupyterlab/theme-light-extension'),
require('@jupyterlab/theme-dark-extension'),
require('@jupyter-widgets/jupyterlab-manager/lib/plugin').default.filter(
(p: any) => p.id !== '@jupyter-widgets/jupyterlab-manager:plugin'
),
plugins
];

Expand Down Expand Up @@ -101,7 +99,7 @@ async function main() {
);
federatedExtensions.forEach((p) => {
if (p.status === 'fulfilled') {
for (const plugin of activePlugins(p.value, disabled)) {
for (const plugin of activePlugins(p.value, [])) {
mods.push(plugin);
}
} else {
Expand All @@ -115,7 +113,7 @@ async function main() {
);
federatedMimeExtensions.forEach((p) => {
if (p.status === 'fulfilled') {
for (const plugin of activePlugins(p.value, disabled)) {
for (const plugin of activePlugins(p.value, [])) {
mimeExtensions.push(plugin);
}
} else {
Expand Down
12 changes: 2 additions & 10 deletions packages/voila/src/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ import {
widgetManager
} from './voilaplugins';

export const TREE_DISABLED_EXTENSIONS = [
'@jupyter-widgets/jupyterlab-manager:plugin',
'@jupyter-widgets/jupyterlab-manager:saveWidgetState',
'@jupyter-widgets/jupyterlab-manager:base-2.0.0',
'@jupyter-widgets/jupyterlab-manager:controls-2.0.0',
'@jupyter-widgets/jupyterlab-manager:output-1.0.0'
];

/**
* The main function
*/
Expand Down Expand Up @@ -100,7 +92,7 @@ async function main() {
);
federatedExtensions.forEach((p) => {
if (p.status === 'fulfilled') {
for (const plugin of activePlugins(p.value, TREE_DISABLED_EXTENSIONS)) {
for (const plugin of activePlugins(p.value, [])) {
mods.push(plugin);
}
} else {
Expand All @@ -114,7 +106,7 @@ async function main() {
);
federatedMimeExtensions.forEach((p) => {
if (p.status === 'fulfilled') {
for (const plugin of activePlugins(p.value, TREE_DISABLED_EXTENSIONS)) {
for (const plugin of activePlugins(p.value, [])) {
mimeExtensions.push(plugin);
}
} else {
Expand Down
3 changes: 2 additions & 1 deletion voila/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,10 @@ def get_page_config(base_url, settings, log, voila_configuration: VoilaConfigura
disabled_extensions = [
"@voila-dashboards/jupyterlab-preview",
"@jupyter/collaboration-extension",
"@jupyter-widgets/jupyterlab-manager",
]
disabled_extensions.extend(page_config.get("disabledExtensions", []))
required_extensions = ["@jupyter-widgets/jupyterlab-manager"]
required_extensions = []
federated_extensions = deepcopy(page_config["federated_extensions"])

page_config["federated_extensions"] = filter_extension(
Expand Down
Loading