From 41a994bc6bcfb157cb2c8e49b15d59fb797fc9ea Mon Sep 17 00:00:00 2001 From: Nick Strayer Date: Tue, 2 Apr 2024 13:10:15 -0400 Subject: [PATCH 1/3] Fix occlusion for help viewer --- .../contrib/positronHelp/browser/positronHelpView.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/vs/workbench/contrib/positronHelp/browser/positronHelpView.tsx b/src/vs/workbench/contrib/positronHelp/browser/positronHelpView.tsx index eaab1e68442..4609c1e391d 100644 --- a/src/vs/workbench/contrib/positronHelp/browser/positronHelpView.tsx +++ b/src/vs/workbench/contrib/positronHelp/browser/positronHelpView.tsx @@ -169,6 +169,12 @@ export class PositronHelpView extends ViewPane implements IReactComponentContain @IThemeService themeService: IThemeService, @IViewDescriptorService viewDescriptorService: IViewDescriptorService ) { + // Override minimum size option if it isn't already somehow set. There doesn't seem to be a + // way to set this in any sort of configuration hence the need to override it here. If this + // isn't set, then the help pane will occlude parts of the editor when it is resized to be + // very small. + options = { ...options, minimumBodySize: 0 }; + // Call the base class's constructor. super( options, From 4cb14122e3ba6e3a7110aeb9479a99520fa2343e Mon Sep 17 00:00:00 2001 From: Nick Strayer Date: Tue, 2 Apr 2024 13:15:06 -0400 Subject: [PATCH 2/3] Fix viewer pane as well --- .../contrib/positronPreview/browser/positronPreviewView.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/vs/workbench/contrib/positronPreview/browser/positronPreviewView.tsx b/src/vs/workbench/contrib/positronPreview/browser/positronPreviewView.tsx index b140ab28c9e..161607c864b 100644 --- a/src/vs/workbench/contrib/positronPreview/browser/positronPreviewView.tsx +++ b/src/vs/workbench/contrib/positronPreview/browser/positronPreviewView.tsx @@ -85,6 +85,12 @@ export class PositronPreviewViewPane extends ViewPane implements IReactComponent @IWorkbenchLayoutService private readonly layoutService: IWorkbenchLayoutService, @IPositronPreviewService private readonly positronPreviewService: IPositronPreviewService ) { + // Override minimum size option if it isn't already somehow set. There doesn't seem to be a + // way to set this in any sort of configuration hence the need to override it here. If this + // isn't set, then the help pane will occlude parts of the editor when it is resized to be + // very small. + options = { ...options, minimumBodySize: 0 }; + super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService); this._register(this.onDidChangeBodyVisibility(() => this.onDidChangeVisibility(this.isBodyVisible()))); this._positronPreviewContainer = DOM.$('.positron-preview-container'); From fd37c45f3fbe5e4ae61dd1d8cf6a5f3b46a324f6 Mon Sep 17 00:00:00 2001 From: Nick Strayer Date: Wed, 3 Apr 2024 10:26:41 -0400 Subject: [PATCH 3/3] Add todo and remove repetition in comments. --- .../contrib/positronHelp/browser/positronHelpView.tsx | 1 + .../contrib/positronPreview/browser/positronPreviewView.tsx | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/positronHelp/browser/positronHelpView.tsx b/src/vs/workbench/contrib/positronHelp/browser/positronHelpView.tsx index 4609c1e391d..4f6b6b3d2e7 100644 --- a/src/vs/workbench/contrib/positronHelp/browser/positronHelpView.tsx +++ b/src/vs/workbench/contrib/positronHelp/browser/positronHelpView.tsx @@ -173,6 +173,7 @@ export class PositronHelpView extends ViewPane implements IReactComponentContain // way to set this in any sort of configuration hence the need to override it here. If this // isn't set, then the help pane will occlude parts of the editor when it is resized to be // very small. + // TODO: See about disposing the webview entirely when the size is too small to see. options = { ...options, minimumBodySize: 0 }; // Call the base class's constructor. diff --git a/src/vs/workbench/contrib/positronPreview/browser/positronPreviewView.tsx b/src/vs/workbench/contrib/positronPreview/browser/positronPreviewView.tsx index 161607c864b..20eb5de917f 100644 --- a/src/vs/workbench/contrib/positronPreview/browser/positronPreviewView.tsx +++ b/src/vs/workbench/contrib/positronPreview/browser/positronPreviewView.tsx @@ -85,10 +85,8 @@ export class PositronPreviewViewPane extends ViewPane implements IReactComponent @IWorkbenchLayoutService private readonly layoutService: IWorkbenchLayoutService, @IPositronPreviewService private readonly positronPreviewService: IPositronPreviewService ) { - // Override minimum size option if it isn't already somehow set. There doesn't seem to be a - // way to set this in any sort of configuration hence the need to override it here. If this - // isn't set, then the help pane will occlude parts of the editor when it is resized to be - // very small. + // Override minimum size option if it isn't already somehow set. See `PositronHelpView` for + // more context. options = { ...options, minimumBodySize: 0 }; super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);