提交 69fa46da 编写于 作者: B Benjamin Pasero

status bar: do not consume space for hidden status

上级 c8dbbefc
......@@ -35,6 +35,10 @@
margin-left: 5px;
}
.monaco-workbench > .part.statusbar > .statusbar-item:empty {
display: none;
}
.monaco-workbench > .part.statusbar > .statusbar-item a:not([disabled]):not(.disabled) {
cursor: pointer;
display: inline-block;
......
......@@ -94,6 +94,7 @@ export class ExtensionTipsStatusbarItem implements statusbar.IStatusbarItem {
private static _dontSuggestAgainTimeout = 1000 * 60 * 60 * 24 * 28; // 4 wks
private _domNode: HTMLElement;
private _container: HTMLElement;
private _label: OcticonLabel;
private _previousTips: { [id: string]: number };
......@@ -136,7 +137,7 @@ export class ExtensionTipsStatusbarItem implements statusbar.IStatusbarItem {
}
if (tips.length === 0) {
dom.addClass(this._domNode, 'disabled');
dom.addClass(this._container, 'disabled');
return;
}
......@@ -154,15 +155,18 @@ export class ExtensionTipsStatusbarItem implements statusbar.IStatusbarItem {
}
}
if (hasNewTips) {
dom.removeClass(this._domNode, 'disabled');
dom.removeClass(this._container, 'disabled');
this._telemetryService.publicLog('extensionGallery:tips', { hintingTips: true });
}
}
public render(container: HTMLElement): lifecycle.IDisposable {
this._container = container;
dom.addClass(this._container, 'extensions-suggestions-container');
dom.addClass(this._container, 'disabled');
this._domNode = document.createElement('a');
this._domNode.className = 'extensions-suggestions disabled';
this._domNode.className = 'extensions-suggestions';
this._label = new OcticonLabel(this._domNode);
this._label.text = '$(light-bulb) extension tips';
container.appendChild(this._domNode);
......@@ -173,6 +177,6 @@ export class ExtensionTipsStatusbarItem implements statusbar.IStatusbarItem {
private _onClick(event: MouseEvent): void {
this._storageService.store('extensionsAssistant/tips', JSON.stringify(this._previousTips), StorageScope.GLOBAL);
this._telemetryService.publicLog('extensionGallery:tips', { revealingTips: true });
this._quickOpenService.show('ext tips ').then(() => dom.addClass(this._domNode, 'disabled'));
this._quickOpenService.show('ext tips ').then(() => dom.addClass(this._container, 'disabled'));
}
}
\ No newline at end of file
......@@ -147,10 +147,15 @@
padding: 0 5px 0 5px;
-webkit-transition: visibility 250ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
transition: visibility 250ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
background-color: rgba(76, 119, 76, 0.9);
}
.monaco-shell .extensions-suggestions:not(.disabled) {
background-color: rgba(76, 119, 76, 0.9);
.monaco-workbench > .part.statusbar > .statusbar-item.extensions-suggestions-container {
display: inline-block;
}
.monaco-workbench > .part.statusbar > .statusbar-item.extensions-suggestions-container.disabled {
display: none;
}
.monaco-shell .extensions-suggestions > .octicon {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册