mirror of
https://github.com/Microsoft/vscode
synced 2024-08-25 03:56:03 +00:00
Fix #129366
This commit is contained in:
parent
20a441dfb4
commit
2ad5999741
|
@ -13,7 +13,7 @@ import { Cache, CacheResult } from 'vs/base/common/cache';
|
|||
import { Action, IAction } from 'vs/base/common/actions';
|
||||
import { getErrorMessage, isPromiseCanceledError, onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { dispose, toDisposable, Disposable, DisposableStore, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { append, $, finalHandler, join, addDisposableListener, EventType, setParentFlowTo, reset } from 'vs/base/browser/dom';
|
||||
import { append, $, finalHandler, join, addDisposableListener, EventType, setParentFlowTo, reset, Dimension } from 'vs/base/browser/dom';
|
||||
import { EditorPane } from 'vs/workbench/browser/parts/editor/editorPane';
|
||||
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
|
@ -175,6 +175,7 @@ export class ExtensionEditor extends EditorPane {
|
|||
private readonly transientDisposables = this._register(new DisposableStore());
|
||||
private activeElement: IActiveElement | null = null;
|
||||
private editorLoadComplete: boolean = false;
|
||||
private dimension: Dimension | undefined;
|
||||
|
||||
constructor(
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
|
@ -708,6 +709,10 @@ export class ExtensionEditor extends EditorPane {
|
|||
const readmeContainer = append(details, $('.readme-container'));
|
||||
const additionalDetailsContainer = append(details, $('.additional-details-container'));
|
||||
|
||||
const layout = () => details.classList.toggle('narrow', this.dimension && this.dimension.width < 500);
|
||||
layout();
|
||||
this.contentDisposables.add(toDisposable(arrays.insert(this.layoutParticipants, { layout })));
|
||||
|
||||
let activeElement: IActiveElement | null = null;
|
||||
const manifest = await this.extensionManifest!.get().promise;
|
||||
if (manifest && manifest.extensionPack?.length && this.shallRenderAsExensionPack(manifest)) {
|
||||
|
@ -1545,7 +1550,8 @@ export class ExtensionEditor extends EditorPane {
|
|||
return result.promise;
|
||||
}
|
||||
|
||||
layout(): void {
|
||||
layout(dimension: Dimension): void {
|
||||
this.dimension = dimension;
|
||||
this.layoutParticipants.forEach(p => p.layout());
|
||||
}
|
||||
|
||||
|
|
|
@ -334,12 +334,21 @@
|
|||
flex: 1;
|
||||
}
|
||||
|
||||
.extension-editor > .body > .content > .details.narrow > .readme-container {
|
||||
margin: inherit;
|
||||
max-width: inherit;
|
||||
}
|
||||
|
||||
.extension-editor > .body > .content > .details > .additional-details-container {
|
||||
width: 25%;
|
||||
min-width: 250px;
|
||||
min-width: 175px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.extension-editor > .body > .content > .details.narrow > .additional-details-container {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.extension-editor > .body > .content > .details > .additional-details-container > .monaco-scrollable-element {
|
||||
height: 100%;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue