@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 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 settingsOverride = false;
388
+ let adjustToScreen = false;
389
389
  if (settingRegistry) {
390
390
  const loadSettings = settingRegistry.load(pluginId);
391
391
  const updateSettings = (settings) => {
392
- const visible = settings.get('visible').composite;
392
+ // 'visible' property from user preferences or default settings
393
+ let visible = settings.get('visible').composite;
393
394
  if (settings.user.visible !== undefined) {
394
- settingsOverride = true;
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 (settingsOverride) {
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.1",
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.1",
42
- "@jupyter-notebook/ui-components": "^7.0.0-beta.1",
43
- "@jupyterlab/application": "^4.0.0-rc.0",
44
- "@jupyterlab/apputils": "^4.0.0-rc.0",
45
- "@jupyterlab/celltags": "^4.0.0-alpha.20",
46
- "@jupyterlab/codeeditor": "^4.0.0-rc.0",
47
- "@jupyterlab/console": "^4.0.0-rc.0",
48
- "@jupyterlab/coreutils": "^6.0.0-rc.0",
49
- "@jupyterlab/docmanager": "^4.0.0-rc.0",
50
- "@jupyterlab/docregistry": "^4.0.0-rc.0",
51
- "@jupyterlab/mainmenu": "^4.0.0-rc.0",
52
- "@jupyterlab/settingregistry": "^4.0.0-rc.0",
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
@@ -13,6 +13,10 @@
13
13
  {
14
14
  "command": "notebook:trust",
15
15
  "rank": 20
16
+ },
17
+ {
18
+ "command": "application:close",
19
+ "disabled": true
16
20
  }
17
21
  ]
18
22
  },
package/schema/top.json CHANGED
@@ -18,10 +18,11 @@
18
18
  },
19
19
  "properties": {
20
20
  "visible": {
21
- "type": "boolean",
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": true
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,