Skip to content

Commit

Permalink
Bug fix/occluding viewer panes (#2608)
Browse files Browse the repository at this point in the history
* Fix occlusion for help viewer

* Fix viewer pane as well

* Add todo and remove repetition in comments.
  • Loading branch information
nstrayer authored Apr 3, 2024
1 parent 910443a commit c329257
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,13 @@ 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.
// 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.
super(
options,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ 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. See `PositronHelpView` for
// more context.
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');
Expand Down

0 comments on commit c329257

Please sign in to comment.