Skip to content

Commit

Permalink
Update view size proposal (#157996)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexr00 committed Aug 12, 2022
1 parent 7dd5f05 commit eaa6485
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vs/workbench/api/browser/viewsExtensionPoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ interface IUserFriendlyViewDescriptor {
contextualTitle?: string;
visibility?: string;

size?: number;
initialSize?: number;

// From 'remoteViewDescriptor' type
group?: string;
Expand Down Expand Up @@ -508,10 +508,10 @@ class ViewsExtensionHandler implements IWorkbenchContribution {
}

let weight: number | undefined = undefined;
if (typeof item.size === 'number') {
if (typeof item.initialSize === 'number') {
checkProposedApiEnabled(extension.description, 'contribViewSize');
if (container.extensionId?.value === extension.description.identifier.value) {
weight = item.size;
weight = item.initialSize;
} else {
this.logService.warn(`${extension.description.identifier.value} tried to set the view size of ${item.id} but it was ignored because the view container does not belong to it.`);
}
Expand Down

0 comments on commit eaa6485

Please sign in to comment.