@jupyter-notebook/application-extension 7.0.0-beta.1 → 7.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +9 -6
- package/package.json +13 -14
- package/schema/menus.json +4 -0
- package/schema/top.json +4 -3
package/lib/index.js
CHANGED
|
@@ -380,20 +380,23 @@ const topVisibility = {
|
|
|
380
380
|
execute: () => {
|
|
381
381
|
top.setHidden(top.isVisible);
|
|
382
382
|
if (settingRegistry) {
|
|
383
|
-
void settingRegistry.set(pluginId, 'visible', top.isVisible);
|
|
383
|
+
void settingRegistry.set(pluginId, 'visible', top.isVisible ? 'yes' : 'no');
|
|
384
384
|
}
|
|
385
385
|
},
|
|
386
386
|
isToggled: () => top.isVisible,
|
|
387
387
|
});
|
|
388
|
-
let
|
|
388
|
+
let adjustToScreen = false;
|
|
389
389
|
if (settingRegistry) {
|
|
390
390
|
const loadSettings = settingRegistry.load(pluginId);
|
|
391
391
|
const updateSettings = (settings) => {
|
|
392
|
-
|
|
392
|
+
// 'visible' property from user preferences or default settings
|
|
393
|
+
let visible = settings.get('visible').composite;
|
|
393
394
|
if (settings.user.visible !== undefined) {
|
|
394
|
-
|
|
395
|
-
top.setHidden(!visible);
|
|
395
|
+
visible = settings.user.visible;
|
|
396
396
|
}
|
|
397
|
+
top.setHidden(visible === 'no');
|
|
398
|
+
// adjust to screen from user preferences or default settings
|
|
399
|
+
adjustToScreen = visible === 'automatic';
|
|
397
400
|
};
|
|
398
401
|
Promise.all([loadSettings, app.restored])
|
|
399
402
|
.then(([settings]) => {
|
|
@@ -410,7 +413,7 @@ const topVisibility = {
|
|
|
410
413
|
palette.addItem({ command: CommandIDs.toggleTop, category: 'View' });
|
|
411
414
|
}
|
|
412
415
|
const onChanged = () => {
|
|
413
|
-
if (
|
|
416
|
+
if (!adjustToScreen) {
|
|
414
417
|
return;
|
|
415
418
|
}
|
|
416
419
|
if (app.format === 'desktop') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupyter-notebook/application-extension",
|
|
3
|
-
"version": "7.0.0-beta.
|
|
3
|
+
"version": "7.0.0-beta.3",
|
|
4
4
|
"description": "Jupyter Notebook - Application Extension",
|
|
5
5
|
"homepage": "https://github.com/jupyter/notebook",
|
|
6
6
|
"bugs": {
|
|
@@ -38,19 +38,18 @@
|
|
|
38
38
|
"watch": "tsc -b --watch"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@jupyter-notebook/application": "^7.0.0-beta.
|
|
42
|
-
"@jupyter-notebook/ui-components": "^7.0.0-beta.
|
|
43
|
-
"@jupyterlab/application": "^4.0.0
|
|
44
|
-
"@jupyterlab/apputils": "^4.0.0
|
|
45
|
-
"@jupyterlab/
|
|
46
|
-
"@jupyterlab/
|
|
47
|
-
"@jupyterlab/
|
|
48
|
-
"@jupyterlab/
|
|
49
|
-
"@jupyterlab/
|
|
50
|
-
"@jupyterlab/
|
|
51
|
-
"@jupyterlab/
|
|
52
|
-
"@jupyterlab/
|
|
53
|
-
"@jupyterlab/translation": "^4.0.0-rc.0",
|
|
41
|
+
"@jupyter-notebook/application": "^7.0.0-beta.3",
|
|
42
|
+
"@jupyter-notebook/ui-components": "^7.0.0-beta.3",
|
|
43
|
+
"@jupyterlab/application": "^4.0.0",
|
|
44
|
+
"@jupyterlab/apputils": "^4.0.0",
|
|
45
|
+
"@jupyterlab/codeeditor": "^4.0.0",
|
|
46
|
+
"@jupyterlab/console": "^4.0.0",
|
|
47
|
+
"@jupyterlab/coreutils": "^6.0.0",
|
|
48
|
+
"@jupyterlab/docmanager": "^4.0.0",
|
|
49
|
+
"@jupyterlab/docregistry": "^4.0.0",
|
|
50
|
+
"@jupyterlab/mainmenu": "^4.0.0",
|
|
51
|
+
"@jupyterlab/settingregistry": "^4.0.0",
|
|
52
|
+
"@jupyterlab/translation": "^4.0.0",
|
|
54
53
|
"@lumino/coreutils": "^2.1.1",
|
|
55
54
|
"@lumino/disposable": "^2.1.1",
|
|
56
55
|
"@lumino/widgets": "^2.1.1"
|
package/schema/menus.json
CHANGED
package/schema/top.json
CHANGED
|
@@ -18,10 +18,11 @@
|
|
|
18
18
|
},
|
|
19
19
|
"properties": {
|
|
20
20
|
"visible": {
|
|
21
|
-
"type": "
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": ["yes", "no", "automatic"],
|
|
22
23
|
"title": "Top Bar Visibility",
|
|
23
|
-
"description": "Whether to show the top bar or not",
|
|
24
|
-
"default":
|
|
24
|
+
"description": "Whether to show the top bar or not, yes for always showing, no for always not showing, automatic for adjusting to screen size",
|
|
25
|
+
"default": "automatic"
|
|
25
26
|
}
|
|
26
27
|
},
|
|
27
28
|
"additionalProperties": false,
|