Skip to content

Commit 60c57a6

Browse files
committed
Add the Settings Editor to the landing page
1 parent c133317 commit 60c57a6

File tree

5 files changed

+95
-4
lines changed

5 files changed

+95
-4
lines changed

Diff for: app/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ async function main() {
142142
require('@jupyterlab/theme-light-extension'),
143143
require('@jupyterlab/theme-dark-extension'),
144144
require('@jupyterlab/translation-extension'),
145+
require('@jupyterlab/ui-components-extension'),
145146
// Add the "Hub Control Panel" menu option when running in JupyterHub
146147
require('@jupyterlab/user-extension'),
147148
require('@jupyterlab/hub-extension')
@@ -163,7 +164,8 @@ async function main() {
163164
].includes(id)
164165
),
165166
require('@jupyter-notebook/tree-extension'),
166-
require('@jupyterlab/running-extension')
167+
require('@jupyterlab/running-extension'),
168+
require('@jupyterlab/settingeditor-extension')
167169
]);
168170
break;
169171
}

Diff for: app/package.json

+6
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"@jupyterlab/rendermime-interfaces": "~4.0.0-alpha.7",
6060
"@jupyterlab/running-extension": "~4.0.0-alpha.7",
6161
"@jupyterlab/services": "~7.0.0-alpha.7",
62+
"@jupyterlab/settingeditor-extension": "~4.0.0-alpha.7",
6263
"@jupyterlab/settingregistry": "~4.0.0-alpha.7",
6364
"@jupyterlab/shared-models": "~4.0.0-alpha.7",
6465
"@jupyterlab/shortcuts-extension": "~4.0.0-alpha.7",
@@ -73,6 +74,7 @@
7374
"@jupyterlab/translation": "~4.0.0-alpha.7",
7475
"@jupyterlab/translation-extension": "~4.0.0-alpha.7",
7576
"@jupyterlab/ui-components": "~4.0.0-alpha.22",
77+
"@jupyterlab/ui-components-extension": "~4.0.0-alpha.7",
7678
"@jupyterlab/user": "~4.0.0-alpha.7",
7779
"@jupyterlab/user-extension": "~4.0.0-alpha.7",
7880
"@jupyterlab/vega5-extension": "~4.0.0-alpha.7",
@@ -124,12 +126,14 @@
124126
"@jupyterlab/pdf-extension": "^4.0.0-alpha.7",
125127
"@jupyterlab/rendermime-extension": "^4.0.0-alpha.7",
126128
"@jupyterlab/running-extension": "^4.0.0-alpha.7",
129+
"@jupyterlab/settingeditor-extension": "^4.0.0-alpha.7",
127130
"@jupyterlab/shortcuts-extension": "^4.0.0-alpha.7",
128131
"@jupyterlab/terminal-extension": "^4.0.0-alpha.7",
129132
"@jupyterlab/theme-dark-extension": "^4.0.0-alpha.7",
130133
"@jupyterlab/theme-light-extension": "^4.0.0-alpha.7",
131134
"@jupyterlab/tooltip-extension": "^4.0.0-alpha.7",
132135
"@jupyterlab/translation-extension": "^4.0.0-alpha.7",
136+
"@jupyterlab/ui-components-extension": "^4.0.0-alpha.7",
133137
"@jupyterlab/user-extension": "^4.0.0-alpha.7",
134138
"@jupyterlab/vega5-extension": "^4.0.0-alpha.7"
135139
},
@@ -181,12 +185,14 @@
181185
"@jupyterlab/notebook-extension",
182186
"@jupyterlab/rendermime-extension",
183187
"@jupyterlab/running-extension",
188+
"@jupyterlab/settingeditor-extension",
184189
"@jupyterlab/shortcuts-extension",
185190
"@jupyterlab/terminal-extension",
186191
"@jupyterlab/theme-dark-extension",
187192
"@jupyterlab/theme-light-extension",
188193
"@jupyterlab/tooltip-extension",
189194
"@jupyterlab/translation-extension",
195+
"@jupyterlab/ui-components-extension",
190196
"@jupyterlab/user-extension"
191197
],
192198
"singletonPackages": [

Diff for: packages/tree-extension/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"@jupyterlab/filebrowser": "^4.0.0-alpha.7",
4848
"@jupyterlab/mainmenu": "^4.0.0-alpha.7",
4949
"@jupyterlab/services": "^7.0.0-alpha.7",
50+
"@jupyterlab/settingeditor": "^4.0.0-alpha.7",
5051
"@jupyterlab/settingregistry": "^4.0.0-alpha.7",
5152
"@jupyterlab/statedb": "^4.0.0-alpha.7",
5253
"@jupyterlab/translation": "^4.0.0-alpha.7",

Diff for: packages/tree-extension/src/index.ts

+16-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import { IFileBrowserFactory } from '@jupyterlab/filebrowser';
1111

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

14+
import { ISettingEditorTracker } from '@jupyterlab/settingeditor';
15+
1416
import { ITranslator } from '@jupyterlab/translation';
1517

1618
import {
@@ -138,13 +140,14 @@ const newTerminal: JupyterFrontEndPlugin<void> = {
138140
const browserWidget: JupyterFrontEndPlugin<void> = {
139141
id: '@jupyter-notebook/tree-extension:widget',
140142
requires: [IFileBrowserFactory, ITranslator],
141-
optional: [IRunningSessionManagers],
143+
optional: [IRunningSessionManagers, ISettingEditorTracker],
142144
autoStart: true,
143145
activate: (
144146
app: JupyterFrontEnd,
145147
factory: IFileBrowserFactory,
146148
translator: ITranslator,
147-
manager: IRunningSessionManagers | null
149+
manager: IRunningSessionManagers | null,
150+
settingEditorTracker: ISettingEditorTracker | null
148151
): void => {
149152
const tabPanel = new TabPanel({ tabPlacement: 'top', tabsMovable: true });
150153
tabPanel.addClass('jp-TreePanel');
@@ -170,6 +173,17 @@ const browserWidget: JupyterFrontEndPlugin<void> = {
170173
}
171174

172175
app.shell.add(tabPanel, 'main', { rank: 100 });
176+
177+
if (settingEditorTracker) {
178+
settingEditorTracker.widgetAdded.connect((_, editor) => {
179+
tabPanel.addWidget(editor);
180+
tabPanel.tabBar.addTab(editor.title);
181+
});
182+
183+
// open the settings editor on startup
184+
// comes after to previous call to shell.add
185+
app.commands.execute('settingeditor:open');
186+
}
173187
}
174188
};
175189

Diff for: yarn.lock

+69-1
Original file line numberDiff line numberDiff line change
@@ -1989,6 +1989,24 @@
19891989
"@jupyterlab/services" "^7.0.0-alpha.7"
19901990
"@jupyterlab/translation" "^4.0.0-alpha.7"
19911991

1992+
"@jupyterlab/inspector@^4.0.0-alpha.7":
1993+
version "4.0.0-alpha.7"
1994+
resolved "https://registry.yarnpkg.com/@jupyterlab/inspector/-/inspector-4.0.0-alpha.7.tgz#6115fbeba55960499f0c2814866f4229236ae277"
1995+
integrity sha512-9oFzuii+77WNw762oJZjUyK0TbPPxtcT783enQgNpFjBIEkZOJ7stBgVRAAsXyizkp6swF8z23wNiJjG9238Qg==
1996+
dependencies:
1997+
"@jupyterlab/apputils" "^4.0.0-alpha.7"
1998+
"@jupyterlab/codeeditor" "^4.0.0-alpha.7"
1999+
"@jupyterlab/coreutils" "^6.0.0-alpha.7"
2000+
"@jupyterlab/rendermime" "^4.0.0-alpha.7"
2001+
"@jupyterlab/services" "^7.0.0-alpha.7"
2002+
"@jupyterlab/statedb" "^4.0.0-alpha.7"
2003+
"@jupyterlab/translation" "^4.0.0-alpha.7"
2004+
"@lumino/coreutils" "^1.12.0"
2005+
"@lumino/disposable" "^1.10.1"
2006+
"@lumino/polling" "^1.10.0"
2007+
"@lumino/signaling" "^1.10.1"
2008+
"@lumino/widgets" "^1.31.1"
2009+
19922010
"@jupyterlab/javascript-extension@^4.0.0-alpha.7":
19932011
version "4.0.0-alpha.7"
19942012
resolved "https://registry.yarnpkg.com/@jupyterlab/javascript-extension/-/javascript-extension-4.0.0-alpha.7.tgz#39bab57752cf8f33af8151e9601581c0a22d6a69"
@@ -2309,6 +2327,48 @@
23092327
node-fetch "^2.6.0"
23102328
ws "^7.4.6"
23112329

2330+
"@jupyterlab/settingeditor-extension@^4.0.0-alpha.7":
2331+
version "4.0.0-alpha.7"
2332+
resolved "https://registry.yarnpkg.com/@jupyterlab/settingeditor-extension/-/settingeditor-extension-4.0.0-alpha.7.tgz#e5ff1d945ea0427189f1d16fa16ed4f93b040410"
2333+
integrity sha512-Ehkonh60IQhgEwc/O5A6u/ptqyGLBlV/ie3KKNvQD8cdlh8G68yQtBwsX1GdydoHS/4/LwwgaSsTZeD8ck20sA==
2334+
dependencies:
2335+
"@jupyterlab/application" "^4.0.0-alpha.7"
2336+
"@jupyterlab/apputils" "^4.0.0-alpha.7"
2337+
"@jupyterlab/codeeditor" "^4.0.0-alpha.7"
2338+
"@jupyterlab/rendermime" "^4.0.0-alpha.7"
2339+
"@jupyterlab/settingeditor" "^4.0.0-alpha.7"
2340+
"@jupyterlab/settingregistry" "^4.0.0-alpha.7"
2341+
"@jupyterlab/statedb" "^4.0.0-alpha.7"
2342+
"@jupyterlab/translation" "^4.0.0-alpha.7"
2343+
"@jupyterlab/ui-components" "^4.0.0-alpha.22"
2344+
"@lumino/disposable" "^1.10.1"
2345+
2346+
"@jupyterlab/settingeditor@^4.0.0-alpha.7":
2347+
version "4.0.0-alpha.7"
2348+
resolved "https://registry.yarnpkg.com/@jupyterlab/settingeditor/-/settingeditor-4.0.0-alpha.7.tgz#b1e7b3f9ebfa203bb49afe97442d05c4301be244"
2349+
integrity sha512-9o1Dr91tt+qEgR8ZkOReKbU4Zvv6Tbg2qG1mddvLdqSeHt/FVzy2RpSLQpvdyJ09kDG1UZ8goP4iE+II0+oLtg==
2350+
dependencies:
2351+
"@jupyterlab/application" "^4.0.0-alpha.7"
2352+
"@jupyterlab/apputils" "^4.0.0-alpha.7"
2353+
"@jupyterlab/codeeditor" "^4.0.0-alpha.7"
2354+
"@jupyterlab/inspector" "^4.0.0-alpha.7"
2355+
"@jupyterlab/rendermime" "^4.0.0-alpha.7"
2356+
"@jupyterlab/settingregistry" "^4.0.0-alpha.7"
2357+
"@jupyterlab/statedb" "^4.0.0-alpha.7"
2358+
"@jupyterlab/translation" "^4.0.0-alpha.7"
2359+
"@jupyterlab/ui-components" "^4.0.0-alpha.22"
2360+
"@lumino/algorithm" "^1.9.1"
2361+
"@lumino/commands" "^1.20.0"
2362+
"@lumino/coreutils" "^1.12.0"
2363+
"@lumino/disposable" "^1.10.1"
2364+
"@lumino/messaging" "^1.10.1"
2365+
"@lumino/polling" "^1.10.0"
2366+
"@lumino/signaling" "^1.10.1"
2367+
"@lumino/widgets" "^1.31.1"
2368+
"@rjsf/core" "^3.1.0"
2369+
json-schema "^0.4.0"
2370+
react "^17.0.1"
2371+
23122372
"@jupyterlab/settingregistry@^4.0.0-alpha.7":
23132373
version "4.0.0-alpha.7"
23142374
resolved "https://registry.yarnpkg.com/@jupyterlab/settingregistry/-/settingregistry-4.0.0-alpha.7.tgz#c5c6a3bcd2a413a668df9d6b8b4a1259a60cb16e"
@@ -2516,6 +2576,14 @@
25162576
"@jupyterlab/statedb" "^4.0.0-alpha.7"
25172577
"@lumino/coreutils" "^1.12.0"
25182578

2579+
"@jupyterlab/ui-components-extension@^4.0.0-alpha.7":
2580+
version "4.0.0-alpha.7"
2581+
resolved "https://registry.yarnpkg.com/@jupyterlab/ui-components-extension/-/ui-components-extension-4.0.0-alpha.7.tgz#368401622087c2ffcbaa9634cdd5f97fcd042e96"
2582+
integrity sha512-5wM1tSeShHU+ewaDu/s4277/fSL+FcGK9AXz2WRHU9UGxSS6PVqPc/GsgSnAziAqek4hb746nqRhUPHZ5I62Ww==
2583+
dependencies:
2584+
"@jupyterlab/application" "^4.0.0-alpha.7"
2585+
"@jupyterlab/ui-components" "^4.0.0-alpha.22"
2586+
25192587
"@jupyterlab/ui-components@^4.0.0-alpha.22":
25202588
version "4.0.0-alpha.22"
25212589
resolved "https://registry.yarnpkg.com/@jupyterlab/ui-components/-/ui-components-4.0.0-alpha.22.tgz#1fda27dc0be7f6e184b12ccb2f7cc56df2581cfc"
@@ -8970,7 +9038,7 @@ json-schema-traverse@^1.0.0:
89709038
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2"
89719039
integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==
89729040

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

0 commit comments

Comments
 (0)