Misc PR feedback for chatWidget (#191432)

* Use cached width first to prevent trip to dom
* remove irrelevant dispose call
* fix CSS of inputbox to align it to Quick Pick
This commit is contained in:
Tyler James Leonhardt
2023-08-28 00:10:51 -07:00
committed by GitHub
parent d87941aa32
commit 1a99420d57
2 changed files with 4 additions and 3 deletions

View File

@@ -537,7 +537,6 @@ export class ChatWidget extends Disposable implements IChatWidget {
const mutableDisposable = this._register(new MutableDisposable());
this._register(this.tree.onDidScroll((e) => {
mutableDisposable.value = dom.scheduleAtNextAnimationFrame(() => {
mutableDisposable.dispose();
if (!e.scrollTopChanged || e.heightChanged || e.scrollHeightChanged) {
return;
}
@@ -548,8 +547,9 @@ export class ChatWidget extends Disposable implements IChatWidget {
}
const newHeight = Math.min(renderHeight + diff, maxHeight);
const inputPartHeight = this.inputPart.layout(newHeight, this.container.offsetWidth);
this.layout(newHeight + inputPartHeight, this.container.offsetWidth);
const width = this.bodyDimension?.width ?? this.container.offsetWidth;
const inputPartHeight = this.inputPart.layout(newHeight, width);
this.layout(newHeight + inputPartHeight, width);
});
}));
}

View File

@@ -426,6 +426,7 @@
.quick-input-widget .interactive-session .interactive-input-and-execute-toolbar {
margin: 0;
border-radius: 2px;
}
/* #endregion */