Skip to content

Commit

Permalink
Add the Settings Editor to the landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpio committed Mar 21, 2022
1 parent ed8b1fa commit 02508f9
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 4 deletions.
4 changes: 3 additions & 1 deletion app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ async function main() {
require('@jupyterlab/theme-light-extension'),
require('@jupyterlab/theme-dark-extension'),
require('@jupyterlab/translation-extension'),
require('@jupyterlab/ui-components-extension'),
// Add the "Hub Control Panel" menu option when running in JupyterHub
require('@jupyterlab/user-extension'),
require('@jupyterlab/hub-extension')
Expand All @@ -164,7 +165,8 @@ async function main() {
].includes(id)
),
require('@jupyter-notebook/tree-extension'),
require('@jupyterlab/running-extension')
require('@jupyterlab/running-extension'),
require('@jupyterlab/settingeditor-extension')
]);
break;
}
Expand Down
6 changes: 6 additions & 0 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"@jupyterlab/rendermime-interfaces": "~4.0.0-alpha.7",
"@jupyterlab/running-extension": "~4.0.0-alpha.7",
"@jupyterlab/services": "~7.0.0-alpha.7",
"@jupyterlab/settingeditor-extension": "~4.0.0-alpha.7",
"@jupyterlab/settingregistry": "~4.0.0-alpha.7",
"@jupyterlab/shared-models": "~4.0.0-alpha.7",
"@jupyterlab/shortcuts-extension": "~4.0.0-alpha.7",
Expand All @@ -74,6 +75,7 @@
"@jupyterlab/translation": "~4.0.0-alpha.7",
"@jupyterlab/translation-extension": "~4.0.0-alpha.7",
"@jupyterlab/ui-components": "~4.0.0-alpha.22",
"@jupyterlab/ui-components-extension": "~4.0.0-alpha.7",
"@jupyterlab/user": "~4.0.0-alpha.7",
"@jupyterlab/user-extension": "~4.0.0-alpha.7",
"@jupyterlab/vega5-extension": "~4.0.0-alpha.7",
Expand Down Expand Up @@ -126,12 +128,14 @@
"@jupyterlab/pdf-extension": "^4.0.0-alpha.7",
"@jupyterlab/rendermime-extension": "^4.0.0-alpha.7",
"@jupyterlab/running-extension": "^4.0.0-alpha.7",
"@jupyterlab/settingeditor-extension": "^4.0.0-alpha.7",
"@jupyterlab/shortcuts-extension": "^4.0.0-alpha.7",
"@jupyterlab/terminal-extension": "^4.0.0-alpha.7",
"@jupyterlab/theme-dark-extension": "^4.0.0-alpha.7",
"@jupyterlab/theme-light-extension": "^4.0.0-alpha.7",
"@jupyterlab/tooltip-extension": "^4.0.0-alpha.7",
"@jupyterlab/translation-extension": "^4.0.0-alpha.7",
"@jupyterlab/ui-components-extension": "^4.0.0-alpha.7",
"@jupyterlab/user-extension": "^4.0.0-alpha.7",
"@jupyterlab/vega5-extension": "^4.0.0-alpha.7"
},
Expand Down Expand Up @@ -184,12 +188,14 @@
"@jupyterlab/notebook-extension",
"@jupyterlab/rendermime-extension",
"@jupyterlab/running-extension",
"@jupyterlab/settingeditor-extension",
"@jupyterlab/shortcuts-extension",
"@jupyterlab/terminal-extension",
"@jupyterlab/theme-dark-extension",
"@jupyterlab/theme-light-extension",
"@jupyterlab/tooltip-extension",
"@jupyterlab/translation-extension",
"@jupyterlab/ui-components-extension",
"@jupyterlab/user-extension"
],
"singletonPackages": [
Expand Down
1 change: 1 addition & 0 deletions packages/tree-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"@jupyterlab/filebrowser": "^4.0.0-alpha.7",
"@jupyterlab/mainmenu": "^4.0.0-alpha.7",
"@jupyterlab/services": "^7.0.0-alpha.7",
"@jupyterlab/settingeditor": "^4.0.0-alpha.7",
"@jupyterlab/settingregistry": "^4.0.0-alpha.7",
"@jupyterlab/statedb": "^4.0.0-alpha.7",
"@jupyterlab/translation": "^4.0.0-alpha.7",
Expand Down
18 changes: 16 additions & 2 deletions packages/tree-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { IFileBrowserFactory } from '@jupyterlab/filebrowser';

import { IRunningSessionManagers, RunningSessions } from '@jupyterlab/running';

import { ISettingEditorTracker } from '@jupyterlab/settingeditor';

import { ITranslator } from '@jupyterlab/translation';

import {
Expand Down Expand Up @@ -138,13 +140,14 @@ const newTerminal: JupyterFrontEndPlugin<void> = {
const browserWidget: JupyterFrontEndPlugin<void> = {
id: '@jupyter-notebook/tree-extension:widget',
requires: [IFileBrowserFactory, ITranslator],
optional: [IRunningSessionManagers],
optional: [IRunningSessionManagers, ISettingEditorTracker],
autoStart: true,
activate: (
app: JupyterFrontEnd,
factory: IFileBrowserFactory,
translator: ITranslator,
manager: IRunningSessionManagers | null
manager: IRunningSessionManagers | null,
settingEditorTracker: ISettingEditorTracker | null
): void => {
const tabPanel = new TabPanel({ tabPlacement: 'top', tabsMovable: true });
tabPanel.addClass('jp-TreePanel');
Expand All @@ -170,6 +173,17 @@ const browserWidget: JupyterFrontEndPlugin<void> = {
}

app.shell.add(tabPanel, 'main', { rank: 100 });

if (settingEditorTracker) {
settingEditorTracker.widgetAdded.connect((_, editor) => {
tabPanel.addWidget(editor);
tabPanel.tabBar.addTab(editor.title);
});

// open the settings editor on startup
// comes after to previous call to shell.add
app.commands.execute('settingeditor:open');
}
}
};

Expand Down
70 changes: 69 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1989,6 +1989,24 @@
"@jupyterlab/services" "^7.0.0-alpha.7"
"@jupyterlab/translation" "^4.0.0-alpha.7"

"@jupyterlab/inspector@^4.0.0-alpha.7":
version "4.0.0-alpha.7"
resolved "https://registry.yarnpkg.com/@jupyterlab/inspector/-/inspector-4.0.0-alpha.7.tgz#6115fbeba55960499f0c2814866f4229236ae277"
integrity sha512-9oFzuii+77WNw762oJZjUyK0TbPPxtcT783enQgNpFjBIEkZOJ7stBgVRAAsXyizkp6swF8z23wNiJjG9238Qg==
dependencies:
"@jupyterlab/apputils" "^4.0.0-alpha.7"
"@jupyterlab/codeeditor" "^4.0.0-alpha.7"
"@jupyterlab/coreutils" "^6.0.0-alpha.7"
"@jupyterlab/rendermime" "^4.0.0-alpha.7"
"@jupyterlab/services" "^7.0.0-alpha.7"
"@jupyterlab/statedb" "^4.0.0-alpha.7"
"@jupyterlab/translation" "^4.0.0-alpha.7"
"@lumino/coreutils" "^1.12.0"
"@lumino/disposable" "^1.10.1"
"@lumino/polling" "^1.10.0"
"@lumino/signaling" "^1.10.1"
"@lumino/widgets" "^1.31.1"

"@jupyterlab/javascript-extension@^4.0.0-alpha.7":
version "4.0.0-alpha.7"
resolved "https://registry.yarnpkg.com/@jupyterlab/javascript-extension/-/javascript-extension-4.0.0-alpha.7.tgz#39bab57752cf8f33af8151e9601581c0a22d6a69"
Expand Down Expand Up @@ -2319,6 +2337,48 @@
node-fetch "^2.6.0"
ws "^7.4.6"

"@jupyterlab/settingeditor-extension@^4.0.0-alpha.7":
version "4.0.0-alpha.7"
resolved "https://registry.yarnpkg.com/@jupyterlab/settingeditor-extension/-/settingeditor-extension-4.0.0-alpha.7.tgz#e5ff1d945ea0427189f1d16fa16ed4f93b040410"
integrity sha512-Ehkonh60IQhgEwc/O5A6u/ptqyGLBlV/ie3KKNvQD8cdlh8G68yQtBwsX1GdydoHS/4/LwwgaSsTZeD8ck20sA==
dependencies:
"@jupyterlab/application" "^4.0.0-alpha.7"
"@jupyterlab/apputils" "^4.0.0-alpha.7"
"@jupyterlab/codeeditor" "^4.0.0-alpha.7"
"@jupyterlab/rendermime" "^4.0.0-alpha.7"
"@jupyterlab/settingeditor" "^4.0.0-alpha.7"
"@jupyterlab/settingregistry" "^4.0.0-alpha.7"
"@jupyterlab/statedb" "^4.0.0-alpha.7"
"@jupyterlab/translation" "^4.0.0-alpha.7"
"@jupyterlab/ui-components" "^4.0.0-alpha.22"
"@lumino/disposable" "^1.10.1"

"@jupyterlab/settingeditor@^4.0.0-alpha.7":
version "4.0.0-alpha.7"
resolved "https://registry.yarnpkg.com/@jupyterlab/settingeditor/-/settingeditor-4.0.0-alpha.7.tgz#b1e7b3f9ebfa203bb49afe97442d05c4301be244"
integrity sha512-9o1Dr91tt+qEgR8ZkOReKbU4Zvv6Tbg2qG1mddvLdqSeHt/FVzy2RpSLQpvdyJ09kDG1UZ8goP4iE+II0+oLtg==
dependencies:
"@jupyterlab/application" "^4.0.0-alpha.7"
"@jupyterlab/apputils" "^4.0.0-alpha.7"
"@jupyterlab/codeeditor" "^4.0.0-alpha.7"
"@jupyterlab/inspector" "^4.0.0-alpha.7"
"@jupyterlab/rendermime" "^4.0.0-alpha.7"
"@jupyterlab/settingregistry" "^4.0.0-alpha.7"
"@jupyterlab/statedb" "^4.0.0-alpha.7"
"@jupyterlab/translation" "^4.0.0-alpha.7"
"@jupyterlab/ui-components" "^4.0.0-alpha.22"
"@lumino/algorithm" "^1.9.1"
"@lumino/commands" "^1.20.0"
"@lumino/coreutils" "^1.12.0"
"@lumino/disposable" "^1.10.1"
"@lumino/messaging" "^1.10.1"
"@lumino/polling" "^1.10.0"
"@lumino/signaling" "^1.10.1"
"@lumino/widgets" "^1.31.1"
"@rjsf/core" "^3.1.0"
json-schema "^0.4.0"
react "^17.0.1"

"@jupyterlab/settingregistry@^4.0.0-alpha.7":
version "4.0.0-alpha.7"
resolved "https://registry.yarnpkg.com/@jupyterlab/settingregistry/-/settingregistry-4.0.0-alpha.7.tgz#c5c6a3bcd2a413a668df9d6b8b4a1259a60cb16e"
Expand Down Expand Up @@ -2526,6 +2586,14 @@
"@jupyterlab/statedb" "^4.0.0-alpha.7"
"@lumino/coreutils" "^1.12.0"

"@jupyterlab/ui-components-extension@^4.0.0-alpha.7":
version "4.0.0-alpha.7"
resolved "https://registry.yarnpkg.com/@jupyterlab/ui-components-extension/-/ui-components-extension-4.0.0-alpha.7.tgz#368401622087c2ffcbaa9634cdd5f97fcd042e96"
integrity sha512-5wM1tSeShHU+ewaDu/s4277/fSL+FcGK9AXz2WRHU9UGxSS6PVqPc/GsgSnAziAqek4hb746nqRhUPHZ5I62Ww==
dependencies:
"@jupyterlab/application" "^4.0.0-alpha.7"
"@jupyterlab/ui-components" "^4.0.0-alpha.22"

"@jupyterlab/ui-components@^4.0.0-alpha.22":
version "4.0.0-alpha.22"
resolved "https://registry.yarnpkg.com/@jupyterlab/ui-components/-/ui-components-4.0.0-alpha.22.tgz#1fda27dc0be7f6e184b12ccb2f7cc56df2581cfc"
Expand Down Expand Up @@ -9062,7 +9130,7 @@ json-schema-traverse@^1.0.0:
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2"
integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==

[email protected]:
[email protected], json-schema@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5"
integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==
Expand Down

0 comments on commit 02508f9

Please sign in to comment.