Skip to content

Commit b6d334f

Browse files
Kyle CutlerKaidesuyoo
authored andcommitted
fix persistent workbench UI performance degradation (#324986) (#73)
Co-authored-by: Kaidesuyo <164149205+Kaidesuyoo@users.noreply.github.com>
1 parent d949774 commit b6d334f

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

src/vs/sessions/contrib/automations/browser/automationDialogService.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import * as DOM from '../../../../base/browser/dom.js';
77
import { IButton } from '../../../../base/browser/ui/button/button.js';
88
import { Dialog } from '../../../../base/browser/ui/dialog/dialog.js';
9-
import { DisposableStore } from '../../../../base/common/lifecycle.js';
9+
import { DisposableStore, toDisposable } from '../../../../base/common/lifecycle.js';
1010
import { localize } from '../../../../nls.js';
1111
import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';
1212
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';
@@ -87,8 +87,9 @@ export class AutomationDialogService implements IAutomationDialogService {
8787
localize('automation.dialog.cancel', "Cancel"),
8888
];
8989

90+
const activeContainer = this.layoutService.activeContainer;
9091
const dialog = disposables.add(new Dialog(
91-
this.layoutService.activeContainer,
92+
activeContainer,
9293
title,
9394
buttonLabels,
9495
createWorkbenchDialogOptions({
@@ -131,6 +132,9 @@ export class AutomationDialogService implements IAutomationDialogService {
131132
}, this.keybindingService, this.layoutService, this.hostService),
132133
));
133134

135+
activeContainer.classList.add('automation-dialog-open');
136+
disposables.add(toDisposable(() => activeContainer.classList.remove('automation-dialog-open')));
137+
134138
try {
135139
const result = await dialog.show();
136140
if (result.button !== 0) {

src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2344,20 +2344,18 @@ pane is first mounted. View switches inside the modal are not animated. */
23442344
* contextview.ts as `2575 + layer`). DOM order means the dialog
23452345
* shows on top, hiding any popup the chat input chips, the quick
23462346
* input, or a context menu try to open. We can't change the inline
2347-
* z-index from outside, so use `!important` on rules scoped to
2348-
* `body:has(.automation-dialog)`. They only apply while the
2349-
* automations dialog is on screen, so other dialogs' popup stacking
2350-
* is untouched.
2347+
* z-index from outside, so use `!important` while the dialog service
2348+
* marks the active container as automation-dialog-open.
23512349
*/
2352-
body:has(.automation-dialog) .context-view.monaco-component {
2350+
.automation-dialog-open .context-view.monaco-component {
23532351
z-index: 2600 !important;
23542352
}
23552353

2356-
body:has(.automation-dialog) .quick-input-widget {
2354+
.automation-dialog-open .quick-input-widget {
23572355
z-index: 2600 !important;
23582356
}
23592357

2360-
body:has(.automation-dialog) .monaco-menu-container {
2358+
.automation-dialog-open .monaco-menu-container {
23612359
z-index: 2600 !important;
23622360
}
23632361

@@ -2850,4 +2848,4 @@ body:has(.automation-dialog) .monaco-menu-container {
28502848
overflow: hidden;
28512849
text-overflow: ellipsis;
28522850
max-width: 240px;
2853-
}
2851+
}

0 commit comments

Comments
 (0)