From 8c0efe18268547735613c702f5ffec0af822e1dd Mon Sep 17 00:00:00 2001 From: Esther Perelman Date: Mon, 26 Jul 2021 14:32:27 +0300 Subject: [PATCH] Fixes --- packages/core/src/browser/style/tabs.css | 4 +- packages/core/src/browser/view-container.ts | 136 +++++++++++------- .../src/browser/view/debug-session-widget.ts | 16 ++- .../debug/src/browser/view/debug-widget.ts | 3 +- .../main/browser/view/plugin-view-registry.ts | 16 +-- .../src/browser/styles/index.css | 4 + .../browser/vsx-extensions-view-container.ts | 2 +- 7 files changed, 104 insertions(+), 77 deletions(-) diff --git a/packages/core/src/browser/style/tabs.css b/packages/core/src/browser/style/tabs.css index 04f579b2a6469..e7e84593153ed 100644 --- a/packages/core/src/browser/style/tabs.css +++ b/packages/core/src/browser/style/tabs.css @@ -321,11 +321,11 @@ body.theia-editor-highlightModifiedTabs } .p-TabBar-tab.drop-target-top { - border-top: 2px solid white !important; + border-top: var(--theia-border-width) solid white !important; } .p-TabBar-tab.drop-target-bottom { - border-bottom: 2px solid white !important; + border-bottom: var(--theia-border-width) solid white !important; } /*----------------------------------------------------------------------------- diff --git a/packages/core/src/browser/view-container.ts b/packages/core/src/browser/view-container.ts index 764e59106ca2d..22cb262e4e1e2 100644 --- a/packages/core/src/browser/view-container.ts +++ b/packages/core/src/browser/view-container.ts @@ -29,10 +29,11 @@ import { MAIN_AREA_ID, BOTTOM_AREA_ID } from './shell/theia-dock-panel'; import { FrontendApplicationStateService } from './frontend-application-state'; import { ContextMenuRenderer, Anchor } from './context-menu-renderer'; import { parseCssMagnitude } from './browser'; -import { WidgetManager } from './widget-manager'; +import { WidgetConstructionOptions, WidgetManager } from './widget-manager'; import { TabBarToolbarRegistry, TabBarToolbarFactory, TabBarToolbar } from './shell/tab-bar-toolbar'; import { Key } from './keys'; import { ProgressBarFactory } from './progress-bar-factory'; +import { JSONExt } from '@phosphor/coreutils/lib/json'; export interface ViewContainerTitleOptions { label: string; @@ -203,8 +204,12 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica this.title.label = part.originalContainerTitle?.label || ''; title = Object.assign({}, part.originalContainerTitle); } - if (partLabel && this.title.label !== partLabel) { - this.title.label += ': ' + partLabel; + if (partLabel) { + if (this.title.label && this.title.label !== partLabel) { + this.title.label += ': ' + partLabel; + } else { + this.title.label = partLabel; + } } part.collapsed = false; part.hideTitle(); @@ -270,11 +275,10 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica createPartId(widget: Widget): string { const description = this.widgetManager.getDescription(widget); - return JSON.stringify(description) || widget.id; + return widget.id || JSON.stringify(description); } - addWidget(widget: Widget, options?: ViewContainer.Factory.WidgetOptions, - originalContainerId?: string, originalContainerTitle?: ViewContainerTitleOptions): Disposable { + addWidget(widget: Widget, options?: ViewContainer.Factory.WidgetOptions, originalContainerId?: string, originalContainerTitle?: ViewContainerTitleOptions): Disposable { const existing = this.toRemoveWidgets.get(widget.id); if (existing) { return existing; @@ -291,8 +295,7 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica toRemoveWidget.push(Disposable.create(() => this.toRemoveWidgets.delete(newPart.wrapped.id))); this.registerPart(newPart); if (insertIndex !== undefined || (newPart.options && newPart.options.order !== undefined)) { - const index = insertIndex !== undefined ? insertIndex - : this.getParts().findIndex(part => part.options.order === undefined || part.options.order > newPart.options.order!); + const index = insertIndex ?? this.getParts().findIndex(part => part.options.order === undefined || part.options.order > newPart.options.order!); if (index >= 0) { this.containerLayout.insertWidget(index, newPart); } else { @@ -351,8 +354,10 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica } protected createNewPartFromExisting(part: ViewContainerPart): ViewContainerPart { - const partId = this.createPartId(part.wrapped); - return new ViewContainerPart(part.wrapped, partId, this.id, part.originalContainerId, part.originalContainerTitle, this.toolbarRegistry, this.toolbarFactory, part.options); + const options = { ...part.options, initiallyHidden: false, initiallyCollapsed: part.collapsed }; + + return new ViewContainerPart(part.wrapped, part.partId, this.id, part.originalContainerId, part.originalContainerTitle, this.toolbarRegistry, + this.toolbarFactory, options); } removeWidget(widget: Widget): boolean { @@ -429,12 +434,18 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica this.lastVisibleState = state; this.doRestoreState(state); } - protected doRestoreState(state: ViewContainer.State): void { + protected async doRestoreState(state: ViewContainer.State): Promise { this.setTitleOptions(state.title); // restore widgets for (const part of state.parts) { if (part.widget) { - this.addWidget(part.widget, undefined, part.originalContainerId, part.originalContainerTitle); + this.addWidget(part.widget, undefined, part.originalContainerId, part.originalContainerTitle || {} as ViewContainerTitleOptions); + } else if (part.originalContainerId !== this.id) { + // Need to move the part to its current container + const originalContainer = await this.widgetManager.getWidget(part.originalContainerId); + if (originalContainer) { + this.moveBetweenContainers(originalContainer.getPartIndex(part.partId), -1, originalContainer); + } } } const partStates = state.parts.filter(partState => some(this.containerLayout.iter(), p => p.partId === partState.partId)); @@ -442,7 +453,7 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica // Reorder the parts according to the stored state for (let index = 0; index < partStates.length; index++) { const partState = partStates[index]; - const currentIndex = this.getPartIndex(partState.partId); + const currentIndex = this.getParts().findIndex(part => part.partId === partState.partId); if (currentIndex > index) { this.containerLayout.moveWidget(currentIndex, index, this.getParts()[currentIndex]); } @@ -553,44 +564,46 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica return; } const newPart = this.createNewPartFromExisting(part); - if (newPart.collapsed !== part.collapsed) { - newPart.collapsed = part.collapsed; - }; this.attachNewPart(newPart, index); part.fireOnDidRecreate(newPart, this); } - moveBetweenContainers(toMovedId: string, moveBeforeThisId: string | undefined, fromContainer: ViewContainer, fromContainerTitle?: ViewContainerTitleOptions): void { - const fromIndex = fromContainer.getPartIndex(toMovedId); - let toIndex = this.getPartIndex(moveBeforeThisId); - // Increase the index to insert the part after the dropped target but not before it. - toIndex += toIndex > -1 ? 1 : 0; + moveBetweenContainers(fromIndex: number, toIndex: number, fromContainer: ViewContainer): void { const partToMove = fromContainer.getParts()[fromIndex]; fromContainer.removeWidget(partToMove); this.appendPart(partToMove, toIndex); fromContainer.updateTitle(); } + sameWidgetDescription(currentDescription: WidgetConstructionOptions, fromDescription: WidgetConstructionOptions): boolean { + return currentDescription.factoryId === fromDescription.factoryId && + JSONExt.deepEqual(JSON.stringify(currentDescription.options), JSON.stringify(fromDescription.options)); + } + protected async movePart(fromContainerDescription: string, toMovedId: string, moveBeforeThisId?: string): Promise { if (!fromContainerDescription) { return; } const fromDescription = JSON.parse(fromContainerDescription); const currentDescription = this.widgetManager.getDescription(this); - const areBothDebuggerContainers = fromDescription.debugWidgetId && this.parent?.parent?.id === fromDescription.debugWidgetId; - const sameContainers = areBothDebuggerContainers || currentDescription?.factoryId === fromDescription.factoryId; + const isCurrentContainer = currentDescription && this.sameWidgetDescription(currentDescription, fromDescription); + const isCurrentDebugContainer = this.isDebugContainer() && this.getDebugWidgetId() === fromDescription.debugWidgetId; + const sameContainers = isCurrentContainer || isCurrentDebugContainer; if (sameContainers) { return this.moveBefore(toMovedId, moveBeforeThisId!); } if (!sameContainers && !this.disableDNDBetweenContainers) { - const widget = await this.widgetManager.getWidget(fromDescription.factoryId || fromDescription.debugWidgetId, fromDescription.options); - if (widget && widget instanceof ViewContainer) { - return this.moveBetweenContainers(toMovedId, moveBeforeThisId, widget, widget.titleOptions); - } - if (widget && 'sessionWidget' in widget) { + let widget = await this.widgetManager.getWidget(fromDescription.factoryId || fromDescription.debugWidgetId, fromDescription.options); + if (widget && this.isDebugWidget(widget)) { // eslint-disable-next-line @typescript-eslint/no-explicit-any - const debugWidget = widget as any; - return this.moveBetweenContainers(toMovedId, moveBeforeThisId, debugWidget['sessionWidget']['viewContainer'], debugWidget['title']); + widget = (widget as any)['sessionWidget']['viewContainer']; + } + if (widget && widget instanceof ViewContainer) { + const fromIndex = widget.getPartIndex(toMovedId); + let toIndex = this.getPartIndex(moveBeforeThisId); + // Increase the index to insert the part after the dropped target but not before it. + toIndex += toIndex > -1 ? 1 : 0; + return this.moveBetweenContainers(fromIndex, toIndex, widget); } } } @@ -661,7 +674,7 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica protected registerDND(part: ViewContainerPart): Disposable { part['header'].draggable = true; const style = (event: DragEvent) => { - if ((!ViewContainer.isSupportedDND(event) && !ViewContainer.isInternalDND(event))) { + if ((!ViewContainer.isDNDSupported(event) && !ViewContainer.isInternalDND(event))) { if (event.dataTransfer) { event.dataTransfer.dropEffect = 'none'; } @@ -681,16 +694,13 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica } }; const unstyle = (event: DragEvent) => { - if (!ViewContainer.isSupportedDND(event) && !ViewContainer.isInternalDND(event)) { + if (!ViewContainer.isDNDSupported(event) && !ViewContainer.isInternalDND(event)) { return; } event.preventDefault(); const enclosingPartNode = ViewContainerPart.closestPart(event.target); if (enclosingPartNode) { enclosingPartNode.classList.remove('drop-target'); - // const partIndex = this.getParts().findIndex(p => p.id === enclosingPartNode.id); - // const enclosingHandleNode = this.containerLayout.handles[partIndex]; - // enclosingHandleNode.classList.remove('drop-target'); } }; return new DisposableCollection( @@ -710,8 +720,8 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica dataTransfer.setData(ViewContainer.DataTransfers.FROM_CONTAINER_DESCRIPTION, JSON.stringify(desc)); } else { // The view container inside DebugWidget has no description, Setting `debugWidgetId` property instead. - if (this.parent?.parent && 'sessionWidget' in this.parent.parent) { - dataTransfer.setData(ViewContainer.DataTransfers.FROM_CONTAINER_DESCRIPTION, JSON.stringify({ debugWidgetId: this.parent.parent['id'] })); + if (this.isDebugContainer()) { + dataTransfer.setData(ViewContainer.DataTransfers.FROM_CONTAINER_DESCRIPTION, JSON.stringify({ debugWidgetId: this.getDebugWidgetId() })); } } const dragImage = document.createElement('div'); @@ -731,7 +741,7 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica event.stopPropagation(); const { dataTransfer } = event; if (dataTransfer) { - if (ViewContainer.isSupportedDND(event)) { + if (ViewContainer.isDNDSupported(event)) { const moveId = dataTransfer.getData(ViewContainer.DataTransfers.DND); const containerDescription = dataTransfer.getData(ViewContainer.DataTransfers.FROM_CONTAINER_DESCRIPTION); if (moveId && moveId !== part.id) { @@ -752,21 +762,22 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica toDisposeOnDragEnd = new DisposableCollection(); protected onDragEnterOrLeave(event: DragEvent): void { - if (!ViewContainer.isSupportedDND(event)) { + if (!ViewContainer.isDNDSupported(event)) { return; } this.toDisposeOnDragEnd.dispose(); } protected onDragOver(event: DragEvent): void { - if (!ViewContainer.isSupportedDND(event) || this.disableDNDBetweenContainers) { + if (!ViewContainer.isDNDSupported(event) || this.disableDNDBetweenContainers) { if (event.dataTransfer) { event.dataTransfer.dropEffect = 'none'; } return; } - if (this.parent instanceof DockPanel) { - const { overlay } = this.parent; + const containerDockPanel = this.isDebugContainer() ? this.parent!.parent!.parent : this.parent; + if (containerDockPanel instanceof DockPanel) { + const { overlay } = containerDockPanel; overlay.show({ top: 0, bottom: 0, right: 0, left: 0 }); this.toDisposeOnDragEnd.push(Disposable.create(() => @@ -777,7 +788,7 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica protected onDrop(event: DragEvent): void { const { dataTransfer } = event; - if (!dataTransfer || !ViewContainer.isSupportedDND(event) || this.disableDNDBetweenContainers) { + if (!dataTransfer || !ViewContainer.isDNDSupported(event) || this.disableDNDBetweenContainers) { return; } const moveId = dataTransfer.getData(ViewContainer.DataTransfers.DND); @@ -788,6 +799,20 @@ export class ViewContainer extends BaseWidget implements StatefulWidget, Applica this.toDisposeOnDragEnd.dispose(); } + protected isDebugContainer(): boolean { + return !!this.parent && !!this.parent.parent && this.isDebugWidget(this.parent.parent); + } + + protected isDebugWidget(widget: Widget): boolean { + return 'sessionWidget' in widget; + } + + protected getDebugWidgetId(): string | undefined { + if (this.isDebugContainer()) { + return this.parent!.parent!.id; + } + } + } export namespace ViewContainer { @@ -807,7 +832,8 @@ export namespace ViewContainer { readonly initiallyHidden?: boolean; /** * Disable dragging this part from its original container to other containers, - * But allow dropping parts from other containers on it. + * But allow dropping parts from other containers on it, + * This option only applies to the `ViewContainerPart` and has no effect on the ViewContainer. */ readonly disableDraggingToOtherContainers?: boolean; } @@ -831,30 +857,30 @@ export namespace ViewContainer { return 'vertical'; } - export function isSupportedDND(event: DragEvent): boolean { + export function isDNDSupported(event: DragEvent): boolean { const { dataTransfer } = event; - return !!dataTransfer && dataTransfer.types.indexOf(DataTransfers.DND) > -1; + return !!dataTransfer && dataTransfer.types.includes(DataTransfers.DND); } export function isInternalDND(event: DragEvent): boolean { const { dataTransfer } = event; - return !!dataTransfer && dataTransfer.types.indexOf(DataTransfers.INTERNAL_DND) > -1; + return !!dataTransfer && dataTransfer.types.includes(DataTransfers.INTERNAL_DND); } - export const DataTransfers = { + export enum DataTransfers { /** * Dnd between containers (including INTERNAL_DND). */ - DND: 'view-container-dnd', + DND = 'view-container-dnd', /** * Allow dnd only inside the original container. */ - INTERNAL_DND: 'view-container-internal-dnd', + INTERNAL_DND = 'view-container-internal-dnd', /** * The widget description of the container where the part was dragged from. * (in case the view container belongs to 'DebugWidget' the description will only include the property: `debugWidgetId`) */ - FROM_CONTAINER_DESCRIPTION: 'from-container-description', + FROM_CONTAINER_DESCRIPTION = 'from-container-description', }; } @@ -899,7 +925,7 @@ export class ViewContainerPart extends BaseWidget { super(); wrapped.parent = this; wrapped.disposed.connect(() => this.dispose()); - this.id = `${currentContainerId}--${wrapped.id}`; + this.id = `${originalContainerId}--${wrapped.id}`; this.addClass('part'); const fireTitleChanged = () => this.onTitleChangedEmitter.fire(undefined); @@ -1068,8 +1094,8 @@ export class ViewContainerPart extends BaseWidget { const title = document.createElement('span'); title.classList.add('label', 'noselect'); const updateTitle = () => { - if (this.currentContainerId !== this.originalContainerId && this.originalContainerTitle) { - // Creating title in format: : . + if (this.currentContainerId !== this.originalContainerId && this.originalContainerTitle?.label) { + // Creating a title in format: : . title.innerText = this.originalContainerTitle.label + ': ' + this.wrapped.title.label; } else { title.innerText = this.wrapped.title.label; @@ -1247,7 +1273,7 @@ export class ViewContainerLayout extends SplitLayout { protected onAfterAttach(msg: Message): void { this.handles.forEach(handle => { - // In case of `dragover` event on the part `handle`, Need to stop propagation to prevent the parent handler execution. + // In case of `dragover` event on the part `handle`, Need to prevent the parent (ViewContainer node) handler execution. addEventListener(handle, 'dragover', event => { event.preventDefault(); event.stopPropagation(); diff --git a/packages/debug/src/browser/view/debug-session-widget.ts b/packages/debug/src/browser/view/debug-session-widget.ts index d2ebd97af2edd..0aae7c19209a7 100644 --- a/packages/debug/src/browser/view/debug-session-widget.ts +++ b/packages/debug/src/browser/view/debug-session-widget.ts @@ -16,7 +16,7 @@ import { inject, injectable, postConstruct, interfaces, Container } from '@theia/core/shared/inversify'; import { - Message, ApplicationShell, Widget, BaseWidget, PanelLayout, StatefulWidget, ViewContainer + Message, ApplicationShell, Widget, BaseWidget, PanelLayout, StatefulWidget, ViewContainer, ViewContainerTitleOptions } from '@theia/core/lib/browser'; import { DebugThreadsWidget } from './debug-threads-widget'; import { DebugStackFramesWidget } from './debug-stack-frames-widget'; @@ -25,6 +25,7 @@ import { DebugVariablesWidget } from './debug-variables-widget'; import { DebugToolBar } from './debug-toolbar-widget'; import { DebugViewModel, DebugViewOptions } from './debug-view-model'; import { DebugWatchWidget } from './debug-watch-widget'; +import { DebugWidget } from './debug-widget'; export const DebugSessionWidgetFactory = Symbol('DebugSessionWidgetFactory'); export type DebugSessionWidgetFactory = (options: DebugViewOptions) => DebugSessionWidget; @@ -82,17 +83,18 @@ export class DebugSessionWidget extends BaseWidget implements StatefulWidget, Ap this.title.label = this.model.label; this.title.caption = this.model.label; this.title.closable = true; - this.title.iconClass = 'debug-tab-icon'; + this.title.iconClass = DebugWidget.ICON_CLASS; this.addClass('theia-session-container'); this.viewContainer = this.viewContainerFactory({ id: 'debug:view-container:' + this.model.id }); - this.viewContainer.addWidget(this.threads, { weight: 30 }); - this.viewContainer.addWidget(this.stackFrames, { weight: 20 }); - this.viewContainer.addWidget(this.variables, { weight: 10 }); - this.viewContainer.addWidget(this.watch, { weight: 10 }); - this.viewContainer.addWidget(this.breakpoints, { weight: 10 }); + const ViewContainerTitle: ViewContainerTitleOptions = { label: DebugWidget.LABEL, iconClass: DebugWidget.ICON_CLASS }; + this.viewContainer.addWidget(this.threads, { weight: 30 }, undefined, ViewContainerTitle); + this.viewContainer.addWidget(this.stackFrames, { weight: 20 }, undefined, ViewContainerTitle); + this.viewContainer.addWidget(this.variables, { weight: 10 }, undefined, ViewContainerTitle); + this.viewContainer.addWidget(this.watch, { weight: 10 }, undefined, ViewContainerTitle); + this.viewContainer.addWidget(this.breakpoints, { weight: 10 }, undefined, ViewContainerTitle); this.toDispose.pushAll([ this.toolbar, diff --git a/packages/debug/src/browser/view/debug-widget.ts b/packages/debug/src/browser/view/debug-widget.ts index 78f6efb82a56e..0553efafbe02f 100644 --- a/packages/debug/src/browser/view/debug-widget.ts +++ b/packages/debug/src/browser/view/debug-widget.ts @@ -39,6 +39,7 @@ export class DebugWidget extends BaseWidget implements StatefulWidget, Applicati static ID = 'debug'; static LABEL = 'Debug'; + static ICON_CLASS = 'debug-tab-icon'; @inject(DebugViewModel) readonly model: DebugViewModel; @@ -61,7 +62,7 @@ export class DebugWidget extends BaseWidget implements StatefulWidget, Applicati this.title.label = DebugWidget.LABEL; this.title.caption = DebugWidget.LABEL; this.title.closable = true; - this.title.iconClass = 'debug-tab-icon'; + this.title.iconClass = DebugWidget.ICON_CLASS; this.addClass('theia-debug-container'); this.toDispose.pushAll([ this.toolbar, diff --git a/packages/plugin-ext/src/main/browser/view/plugin-view-registry.ts b/packages/plugin-ext/src/main/browser/view/plugin-view-registry.ts index 3a7884ee13bcf..559d0394ea3c5 100644 --- a/packages/plugin-ext/src/main/browser/view/plugin-view-registry.ts +++ b/packages/plugin-ext/src/main/browser/view/plugin-view-registry.ts @@ -288,12 +288,6 @@ export class PluginViewRegistry implements FrontendApplicationContribution { const toDispose = new DisposableCollection(); view.when = view.when?.trim(); - // const existWidget = this.widgetManager.tryGetWidget(PLUGIN_VIEW_FACTORY_ID, this.toPluginViewWidgetIdentifier(view.id)); - // const { lastDroppedContainer } = existWidget || {}; - // if (lastDroppedContainer && this.fromViewContainerIdentifier(lastDroppedContainer) !== viewContainerId) { - // const containerId = this.fromViewContainerIdentifier(lastDroppedContainer); - // viewContainerId = ViewContainerIdentifiers[containerId] || containerId; - // } this.views.set(view.id, [viewContainerId, view]); toDispose.push(Disposable.create(() => this.views.delete(view.id))); @@ -487,8 +481,8 @@ export class PluginViewRegistry implements FrontendApplicationContribution { } protected registerWidgetPartEvents(widget: PluginViewWidget, containerWidget: ViewContainerWidget): ViewContainerPart | undefined { - const part = containerWidget.getPartFor(widget); - if (part) { + const part = containerWidget.getPartFor(widget) || widget.parent; + if (part instanceof ViewContainerPart) { this.onPartAttached(part, containerWidget); part.onDidRecreatePart(event => { this.onPartAttached(event.newPart, event.container); @@ -530,9 +524,9 @@ export class PluginViewRegistry implements FrontendApplicationContribution { case EXPLORER_VIEW_CONTAINER_ID: return 'explorer'; case SCM_VIEW_CONTAINER_ID: return 'scm'; case SEARCH_VIEW_CONTAINER_ID: return 'search'; - case EXPLORER_VIEW_CONTAINER_ID: return 'explorer'; - case undefined: return container.parent?.parent instanceof DebugWidget ? 'debug' : undefined; - default: return description?.factoryId; + case undefined: return container.parent?.parent instanceof DebugWidget ? 'debug' : container.id; + case PLUGIN_VIEW_CONTAINER_FACTORY_ID: return this.toViewContainerId(description.options); + default: return container.id; } } diff --git a/packages/search-in-workspace/src/browser/styles/index.css b/packages/search-in-workspace/src/browser/styles/index.css index 41a2e92b14b2e..a088d81b9b84f 100644 --- a/packages/search-in-workspace/src/browser/styles/index.css +++ b/packages/search-in-workspace/src/browser/styles/index.css @@ -14,6 +14,10 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ + #search-in-workspace { + height: 100%; +} + .t-siw-search-container { padding: 5px ; display: flex; diff --git a/packages/vsx-registry/src/browser/vsx-extensions-view-container.ts b/packages/vsx-registry/src/browser/vsx-extensions-view-container.ts index 143c418c3e9dd..2e5a78b65aa79 100644 --- a/packages/vsx-registry/src/browser/vsx-extensions-view-container.ts +++ b/packages/vsx-registry/src/browser/vsx-extensions-view-container.ts @@ -147,7 +147,7 @@ export class VSXExtensionsViewContainer extends ViewContainer { } // eslint-disable-next-line @typescript-eslint/no-explicit-any - protected doRestoreState(state: any): void { + protected async doRestoreState(state: any): Promise { // eslint-disable-next-line guard-for-in for (const key in state.modes) { const mode = Number(key) as VSXSearchMode;