Skip to content

Commit 7589f6c

Browse files
committed
Loads side panel widgets only on notebook page
1 parent 2f9fccb commit 7589f6c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

app/index.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ async function main() {
9191
'@jupyterlab/apputils-extension:toolbar-registry'
9292
].includes(id)
9393
),
94-
require('@jupyterlab/celltags-extension'),
9594
require('@jupyterlab/codemirror-extension').default.filter(({ id }) =>
9695
[
9796
'@jupyterlab/codemirror-extension:services',
@@ -137,8 +136,6 @@ async function main() {
137136
'@jupyterlab/notebook-extension:code-console',
138137
'@jupyterlab/notebook-extension:export',
139138
'@jupyterlab/notebook-extension:factory',
140-
'@jupyterlab/notebook-extension:toc',
141-
'@jupyterlab/notebook-extension:tools',
142139
'@jupyterlab/notebook-extension:tracker',
143140
'@jupyterlab/notebook-extension:widget-factory'
144141
].includes(id)
@@ -149,12 +146,6 @@ async function main() {
149146
require('@jupyterlab/terminal-extension'),
150147
require('@jupyterlab/theme-light-extension'),
151148
require('@jupyterlab/theme-dark-extension'),
152-
require('@jupyterlab/toc-extension').default.filter(({ id }) =>
153-
[
154-
'@jupyterlab/toc-extension:registry',
155-
'@jupyterlab/toc-extension:tracker'
156-
].includes(id)
157-
),
158149
require('@jupyterlab/translation-extension'),
159150
// Add the "Hub Control Panel" menu option when running in JupyterHub
160151
require('@jupyterlab/user-extension'),
@@ -184,11 +175,20 @@ async function main() {
184175
}
185176
case 'notebooks': {
186177
baseMods = baseMods.concat([
178+
require('@jupyterlab/celltags-extension'),
187179
require('@jupyterlab/cell-toolbar-extension'),
188180
require('@jupyterlab/notebook-extension').default.filter(({ id }) =>
189181
[
190182
'@jupyterlab/notebook-extension:completer',
191-
'@jupyterlab/notebook-extension:search'
183+
'@jupyterlab/notebook-extension:search',
184+
'@jupyterlab/notebook-extension:toc',
185+
'@jupyterlab/notebook-extension:tools'
186+
].includes(id)
187+
),
188+
require('@jupyterlab/toc-extension').default.filter(({ id }) =>
189+
[
190+
'@jupyterlab/toc-extension:registry',
191+
'@jupyterlab/toc-extension:tracker'
192192
].includes(id)
193193
),
194194
require('@jupyterlab/tooltip-extension').default.filter(({ id }) =>

0 commit comments

Comments
 (0)