Skip to content

Commit 02508f9

Browse files
committed
Add the Settings Editor to the landing page
1 parent ed8b1fa commit 02508f9

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
@@ -143,6 +143,7 @@ async function main() {
143143
require('@jupyterlab/theme-light-extension'),
144144
require('@jupyterlab/theme-dark-extension'),
145145
require('@jupyterlab/translation-extension'),
146+
require('@jupyterlab/ui-components-extension'),
146147
// Add the "Hub Control Panel" menu option when running in JupyterHub
147148
require('@jupyterlab/user-extension'),
148149
require('@jupyterlab/hub-extension')
@@ -164,7 +165,8 @@ async function main() {
164165
].includes(id)
165166
),
166167
require('@jupyter-notebook/tree-extension'),
167-
require('@jupyterlab/running-extension')
168+
require('@jupyterlab/running-extension'),
169+
require('@jupyterlab/settingeditor-extension')
168170
]);
169171
break;
170172
}

Diff for: app/package.json

+6
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"@jupyterlab/rendermime-interfaces": "~4.0.0-alpha.7",
6161
"@jupyterlab/running-extension": "~4.0.0-alpha.7",
6262
"@jupyterlab/services": "~7.0.0-alpha.7",
63+
"@jupyterlab/settingeditor-extension": "~4.0.0-alpha.7",
6364
"@jupyterlab/settingregistry": "~4.0.0-alpha.7",
6465
"@jupyterlab/shared-models": "~4.0.0-alpha.7",
6566
"@jupyterlab/shortcuts-extension": "~4.0.0-alpha.7",
@@ -74,6 +75,7 @@
7475
"@jupyterlab/translation": "~4.0.0-alpha.7",
7576
"@jupyterlab/translation-extension": "~4.0.0-alpha.7",
7677
"@jupyterlab/ui-components": "~4.0.0-alpha.22",
78+
"@jupyterlab/ui-components-extension": "~4.0.0-alpha.7",
7779
"@jupyterlab/user": "~4.0.0-alpha.7",
7880
"@jupyterlab/user-extension": "~4.0.0-alpha.7",
7981
"@jupyterlab/vega5-extension": "~4.0.0-alpha.7",
@@ -126,12 +128,14 @@
126128
"@jupyterlab/pdf-extension": "^4.0.0-alpha.7",
127129
"@jupyterlab/rendermime-extension": "^4.0.0-alpha.7",
128130
"@jupyterlab/running-extension": "^4.0.0-alpha.7",
131+
"@jupyterlab/settingeditor-extension": "^4.0.0-alpha.7",
129132
"@jupyterlab/shortcuts-extension": "^4.0.0-alpha.7",
130133
"@jupyterlab/terminal-extension": "^4.0.0-alpha.7",
131134
"@jupyterlab/theme-dark-extension": "^4.0.0-alpha.7",
132135
"@jupyterlab/theme-light-extension": "^4.0.0-alpha.7",
133136
"@jupyterlab/tooltip-extension": "^4.0.0-alpha.7",
134137
"@jupyterlab/translation-extension": "^4.0.0-alpha.7",
138+
"@jupyterlab/ui-components-extension": "^4.0.0-alpha.7",
135139
"@jupyterlab/user-extension": "^4.0.0-alpha.7",
136140
"@jupyterlab/vega5-extension": "^4.0.0-alpha.7"
137141
},
@@ -184,12 +188,14 @@
184188
"@jupyterlab/notebook-extension",
185189
"@jupyterlab/rendermime-extension",
186190
"@jupyterlab/running-extension",
191+
"@jupyterlab/settingeditor-extension",
187192
"@jupyterlab/shortcuts-extension",
188193
"@jupyterlab/terminal-extension",
189194
"@jupyterlab/theme-dark-extension",
190195
"@jupyterlab/theme-light-extension",
191196
"@jupyterlab/tooltip-extension",
192197
"@jupyterlab/translation-extension",
198+
"@jupyterlab/ui-components-extension",
193199
"@jupyterlab/user-extension"
194200
],
195201
"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"
@@ -2319,6 +2337,48 @@
23192337
node-fetch "^2.6.0"
23202338
ws "^7.4.6"
23212339

2340+
"@jupyterlab/settingeditor-extension@^4.0.0-alpha.7":
2341+
version "4.0.0-alpha.7"
2342+
resolved "https://registry.yarnpkg.com/@jupyterlab/settingeditor-extension/-/settingeditor-extension-4.0.0-alpha.7.tgz#e5ff1d945ea0427189f1d16fa16ed4f93b040410"
2343+
integrity sha512-Ehkonh60IQhgEwc/O5A6u/ptqyGLBlV/ie3KKNvQD8cdlh8G68yQtBwsX1GdydoHS/4/LwwgaSsTZeD8ck20sA==
2344+
dependencies:
2345+
"@jupyterlab/application" "^4.0.0-alpha.7"
2346+
"@jupyterlab/apputils" "^4.0.0-alpha.7"
2347+
"@jupyterlab/codeeditor" "^4.0.0-alpha.7"
2348+
"@jupyterlab/rendermime" "^4.0.0-alpha.7"
2349+
"@jupyterlab/settingeditor" "^4.0.0-alpha.7"
2350+
"@jupyterlab/settingregistry" "^4.0.0-alpha.7"
2351+
"@jupyterlab/statedb" "^4.0.0-alpha.7"
2352+
"@jupyterlab/translation" "^4.0.0-alpha.7"
2353+
"@jupyterlab/ui-components" "^4.0.0-alpha.22"
2354+
"@lumino/disposable" "^1.10.1"
2355+
2356+
"@jupyterlab/settingeditor@^4.0.0-alpha.7":
2357+
version "4.0.0-alpha.7"
2358+
resolved "https://registry.yarnpkg.com/@jupyterlab/settingeditor/-/settingeditor-4.0.0-alpha.7.tgz#b1e7b3f9ebfa203bb49afe97442d05c4301be244"
2359+
integrity sha512-9o1Dr91tt+qEgR8ZkOReKbU4Zvv6Tbg2qG1mddvLdqSeHt/FVzy2RpSLQpvdyJ09kDG1UZ8goP4iE+II0+oLtg==
2360+
dependencies:
2361+
"@jupyterlab/application" "^4.0.0-alpha.7"
2362+
"@jupyterlab/apputils" "^4.0.0-alpha.7"
2363+
"@jupyterlab/codeeditor" "^4.0.0-alpha.7"
2364+
"@jupyterlab/inspector" "^4.0.0-alpha.7"
2365+
"@jupyterlab/rendermime" "^4.0.0-alpha.7"
2366+
"@jupyterlab/settingregistry" "^4.0.0-alpha.7"
2367+
"@jupyterlab/statedb" "^4.0.0-alpha.7"
2368+
"@jupyterlab/translation" "^4.0.0-alpha.7"
2369+
"@jupyterlab/ui-components" "^4.0.0-alpha.22"
2370+
"@lumino/algorithm" "^1.9.1"
2371+
"@lumino/commands" "^1.20.0"
2372+
"@lumino/coreutils" "^1.12.0"
2373+
"@lumino/disposable" "^1.10.1"
2374+
"@lumino/messaging" "^1.10.1"
2375+
"@lumino/polling" "^1.10.0"
2376+
"@lumino/signaling" "^1.10.1"
2377+
"@lumino/widgets" "^1.31.1"
2378+
"@rjsf/core" "^3.1.0"
2379+
json-schema "^0.4.0"
2380+
react "^17.0.1"
2381+
23222382
"@jupyterlab/settingregistry@^4.0.0-alpha.7":
23232383
version "4.0.0-alpha.7"
23242384
resolved "https://registry.yarnpkg.com/@jupyterlab/settingregistry/-/settingregistry-4.0.0-alpha.7.tgz#c5c6a3bcd2a413a668df9d6b8b4a1259a60cb16e"
@@ -2526,6 +2586,14 @@
25262586
"@jupyterlab/statedb" "^4.0.0-alpha.7"
25272587
"@lumino/coreutils" "^1.12.0"
25282588

2589+
"@jupyterlab/ui-components-extension@^4.0.0-alpha.7":
2590+
version "4.0.0-alpha.7"
2591+
resolved "https://registry.yarnpkg.com/@jupyterlab/ui-components-extension/-/ui-components-extension-4.0.0-alpha.7.tgz#368401622087c2ffcbaa9634cdd5f97fcd042e96"
2592+
integrity sha512-5wM1tSeShHU+ewaDu/s4277/fSL+FcGK9AXz2WRHU9UGxSS6PVqPc/GsgSnAziAqek4hb746nqRhUPHZ5I62Ww==
2593+
dependencies:
2594+
"@jupyterlab/application" "^4.0.0-alpha.7"
2595+
"@jupyterlab/ui-components" "^4.0.0-alpha.22"
2596+
25292597
"@jupyterlab/ui-components@^4.0.0-alpha.22":
25302598
version "4.0.0-alpha.22"
25312599
resolved "https://registry.yarnpkg.com/@jupyterlab/ui-components/-/ui-components-4.0.0-alpha.22.tgz#1fda27dc0be7f6e184b12ccb2f7cc56df2581cfc"
@@ -9062,7 +9130,7 @@ json-schema-traverse@^1.0.0:
90629130
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2"
90639131
integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==
90649132

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

0 commit comments

Comments
 (0)