From 82b4541ce439d9524ac97b6817aade7240e21709 Mon Sep 17 00:00:00 2001 From: g547315 <132482386+g547315@users.noreply.github.com> Date: Mon, 11 Sep 2023 13:52:51 +0000 Subject: [PATCH 1/9] test-first-commit --- packages/widgets/src/tabbar.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/widgets/src/tabbar.ts b/packages/widgets/src/tabbar.ts index bcedd63e6..a52c8702f 100644 --- a/packages/widgets/src/tabbar.ts +++ b/packages/widgets/src/tabbar.ts @@ -71,6 +71,7 @@ export class TabBar extends Widget { this.orientation = options.orientation || 'horizontal'; this.removeBehavior = options.removeBehavior || 'select-tab-after'; this.renderer = options.renderer || TabBar.defaultRenderer; + this.createOverlay(); } /** @@ -573,6 +574,15 @@ export class TabBar extends Widget { }); } + /** + * Create the ovelay UI element for a tab.. + * Displays an element containing a number + */ + createOverlay(): any { + //const focusable: Element[] = [...this.contentNode.children]; + return 1 + } + /** * Release the mouse and restore the non-dragged tab positions. * @@ -849,6 +859,9 @@ export class TabBar extends Widget { nextFocused?.setAttribute('tabindex', '0'); (nextFocused as HTMLElement).focus(); } + } else if (event.key === 'Alt' && 'Shift') { + //this.createOverlay; + console.log("hi"); } } From 77d610e1d3c0c7d4a6fcae1905588de3a63594c5 Mon Sep 17 00:00:00 2001 From: g547315 <132482386+g547315@users.noreply.github.com> Date: Mon, 18 Sep 2023 11:26:57 +0000 Subject: [PATCH 2/9] Added UI overlay element --- packages/widgets/src/tabbar.ts | 26 +++++++++++--------------- packages/widgets/style/tabbar.css | 18 ++++++++++++++++++ 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/packages/widgets/src/tabbar.ts b/packages/widgets/src/tabbar.ts index a52c8702f..a62a9b78f 100644 --- a/packages/widgets/src/tabbar.ts +++ b/packages/widgets/src/tabbar.ts @@ -71,7 +71,6 @@ export class TabBar extends Widget { this.orientation = options.orientation || 'horizontal'; this.removeBehavior = options.removeBehavior || 'select-tab-after'; this.renderer = options.renderer || TabBar.defaultRenderer; - this.createOverlay(); } /** @@ -574,15 +573,6 @@ export class TabBar extends Widget { }); } - /** - * Create the ovelay UI element for a tab.. - * Displays an element containing a number - */ - createOverlay(): any { - //const focusable: Element[] = [...this.contentNode.children]; - return 1 - } - /** * Release the mouse and restore the non-dragged tab positions. * @@ -859,10 +849,7 @@ export class TabBar extends Widget { nextFocused?.setAttribute('tabindex', '0'); (nextFocused as HTMLElement).focus(); } - } else if (event.key === 'Alt' && 'Shift') { - //this.createOverlay; - console.log("hi"); - } + } } /** @@ -1726,7 +1713,8 @@ export namespace TabBar { return h.li( { id, key, className, title, style, dataset, ...aria }, this.renderIcon(data), - this.renderLabel(data) + this.renderLabel(data), + this.renderOverlay(data) ); } } @@ -1768,6 +1756,14 @@ export namespace TabBar { return h.div({ className: 'lm-TabBar-tabCloseIcon' }); } + renderOverlay(data: IRenderData): VirtualElement { + if (data.title.label == 'Launcher') { + return h.div({ className: 'lm-TabBar-UI-Overlay.lm-mod-hidden' }); + } else { + return h.div({ className: 'lm-TabBar-UI-Overlay' }); + } + } + /** * Create a unique render key for the tab. * diff --git a/packages/widgets/style/tabbar.css b/packages/widgets/style/tabbar.css index c61b0fc7a..0eff6e46b 100644 --- a/packages/widgets/style/tabbar.css +++ b/packages/widgets/style/tabbar.css @@ -103,3 +103,21 @@ box-sizing: border-box; background: inherit; } + +.lm-TabBar-UI-Overlay { + position: absolute; + top: 67%; + left: 45%; + width: 47%; + height: 32%; + border-radius: 25%; + z-index: inherit; + text-align: center; + color: rgb(255, 255, 255); + background: rgb(51, 51, 51); + visibility: hidden; +} + +.lm-TabBar-UI-Overlay.lm-mod-hidden { + display: none !important; +} From 6e14e2c4594fc332a5597ce6582aa8e25c179860 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Thu, 28 Sep 2023 11:24:42 -0500 Subject: [PATCH 3/9] backport docs config for PR preview --- .readthedocs.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 3e388237d..8665581a6 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,5 +1,10 @@ version: 2 -sphinx: - configuration: docs/source/conf.py + +build: + os: ubuntu-22.04 + tools: + python: "mambaforge-22.9" conda: environment: docs/environment.yml +sphinx: + configuration: docs/source/conf.py From 2a65482f7fafb043a2a4cf37a1a7fdf46702bf8d Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Wed, 11 Oct 2023 10:55:30 +0000 Subject: [PATCH 4/9] Updated renderOverlay to use the dataset id to identify launchers --- packages/widgets/src/tabbar.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/widgets/src/tabbar.ts b/packages/widgets/src/tabbar.ts index a62a9b78f..fa958fefc 100644 --- a/packages/widgets/src/tabbar.ts +++ b/packages/widgets/src/tabbar.ts @@ -1714,7 +1714,7 @@ export namespace TabBar { { id, key, className, title, style, dataset, ...aria }, this.renderIcon(data), this.renderLabel(data), - this.renderOverlay(data) + this.renderOverlay(dataset) ); } } @@ -1756,8 +1756,15 @@ export namespace TabBar { return h.div({ className: 'lm-TabBar-tabCloseIcon' }); } - renderOverlay(data: IRenderData): VirtualElement { - if (data.title.label == 'Launcher') { + /** + * Add a className to display/hide the ovleray on a tab. + * + * @param dataset - The data to identify a launcher. + * + * @returns A virtual element representing the tab overlay. + */ + renderOverlay(dataset: ElementDataset): VirtualElement { + if (dataset.id?.toLowerCase().includes('launcher')) { return h.div({ className: 'lm-TabBar-UI-Overlay.lm-mod-hidden' }); } else { return h.div({ className: 'lm-TabBar-UI-Overlay' }); From c506af2a59e65ba77b26a1fe4b9255ad3f94213b Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Wed, 11 Oct 2023 10:59:51 +0000 Subject: [PATCH 5/9] Run prettier --- packages/widgets/src/tabbar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/widgets/src/tabbar.ts b/packages/widgets/src/tabbar.ts index fa958fefc..68d6ebd96 100644 --- a/packages/widgets/src/tabbar.ts +++ b/packages/widgets/src/tabbar.ts @@ -849,7 +849,7 @@ export class TabBar extends Widget { nextFocused?.setAttribute('tabindex', '0'); (nextFocused as HTMLElement).focus(); } - } + } } /** From 675a8367cacb651a73e1371801eeb463c04624ee Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Wed, 11 Oct 2023 12:20:47 +0000 Subject: [PATCH 6/9] Fixed API check --- review/api/widgets.api.md | 1 + 1 file changed, 1 insertion(+) diff --git a/review/api/widgets.api.md b/review/api/widgets.api.md index 7462b947b..4163f208e 100644 --- a/review/api/widgets.api.md +++ b/review/api/widgets.api.md @@ -1188,6 +1188,7 @@ export namespace TabBar { renderIcon(data: IRenderData): VirtualElement; renderLabel(data: IRenderData): VirtualElement; renderTab(data: IRenderData): VirtualElement; + renderOverlay(dataset: ElementDataset): VirtualElement; } const defaultRenderer: Renderer; const addButtonSelector = ".lm-TabBar-addButton"; From 9bde8488c8fa3c74d6f62dfd421e253817adeca6 Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Wed, 11 Oct 2023 12:36:04 +0000 Subject: [PATCH 7/9] Run yarn api --- review/api/application.api.md | 3 +++ review/api/widgets.api.md | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/review/api/application.api.md b/review/api/application.api.md index cec107714..3c5637c1a 100644 --- a/review/api/application.api.md +++ b/review/api/application.api.md @@ -17,6 +17,8 @@ export class Application { activatePlugin(id: string): Promise; protected addEventListeners(): void; protected attachShell(id: string): void; + get bubblingKeydown(): boolean; + set bubblingKeydown(value: boolean); readonly commands: CommandRegistry; readonly contextMenu: ContextMenu; deactivatePlugin(id: string): Promise; @@ -46,6 +48,7 @@ export namespace Application { shell: T; } export interface IStartOptions { + bubblingKeydown?: boolean; hostID?: string; ignorePlugins?: string[]; startPlugins?: string[]; diff --git a/review/api/widgets.api.md b/review/api/widgets.api.md index 4163f208e..e0832dfb6 100644 --- a/review/api/widgets.api.md +++ b/review/api/widgets.api.md @@ -1187,8 +1187,9 @@ export namespace TabBar { renderCloseIcon(data: IRenderData): VirtualElement; renderIcon(data: IRenderData): VirtualElement; renderLabel(data: IRenderData): VirtualElement; - renderTab(data: IRenderData): VirtualElement; + // (undocumented) renderOverlay(dataset: ElementDataset): VirtualElement; + renderTab(data: IRenderData): VirtualElement; } const defaultRenderer: Renderer; const addButtonSelector = ".lm-TabBar-addButton"; From c4df7e6be69deb07507372f51f260b90d7c11802 Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Wed, 11 Oct 2023 13:02:55 +0000 Subject: [PATCH 8/9] Merged main into branch --- review/api/application.api.md | 3 --- review/api/widgets.api.md | 1 - 2 files changed, 4 deletions(-) diff --git a/review/api/application.api.md b/review/api/application.api.md index 3c5637c1a..cec107714 100644 --- a/review/api/application.api.md +++ b/review/api/application.api.md @@ -17,8 +17,6 @@ export class Application { activatePlugin(id: string): Promise; protected addEventListeners(): void; protected attachShell(id: string): void; - get bubblingKeydown(): boolean; - set bubblingKeydown(value: boolean); readonly commands: CommandRegistry; readonly contextMenu: ContextMenu; deactivatePlugin(id: string): Promise; @@ -48,7 +46,6 @@ export namespace Application { shell: T; } export interface IStartOptions { - bubblingKeydown?: boolean; hostID?: string; ignorePlugins?: string[]; startPlugins?: string[]; diff --git a/review/api/widgets.api.md b/review/api/widgets.api.md index e0832dfb6..c8b3e192e 100644 --- a/review/api/widgets.api.md +++ b/review/api/widgets.api.md @@ -1187,7 +1187,6 @@ export namespace TabBar { renderCloseIcon(data: IRenderData): VirtualElement; renderIcon(data: IRenderData): VirtualElement; renderLabel(data: IRenderData): VirtualElement; - // (undocumented) renderOverlay(dataset: ElementDataset): VirtualElement; renderTab(data: IRenderData): VirtualElement; } From 1946d28445212630534c676fc98a454eeb6a1983 Mon Sep 17 00:00:00 2001 From: EC2 Default User Date: Wed, 11 Oct 2023 13:22:12 +0000 Subject: [PATCH 9/9] Reverted application api --- review/api/application.api.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/review/api/application.api.md b/review/api/application.api.md index cec107714..3c5637c1a 100644 --- a/review/api/application.api.md +++ b/review/api/application.api.md @@ -17,6 +17,8 @@ export class Application { activatePlugin(id: string): Promise; protected addEventListeners(): void; protected attachShell(id: string): void; + get bubblingKeydown(): boolean; + set bubblingKeydown(value: boolean); readonly commands: CommandRegistry; readonly contextMenu: ContextMenu; deactivatePlugin(id: string): Promise; @@ -46,6 +48,7 @@ export namespace Application { shell: T; } export interface IStartOptions { + bubblingKeydown?: boolean; hostID?: string; ignorePlugins?: string[]; startPlugins?: string[];