Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt InlineChatWidget in notebook and fix UI glitches. #207887

Merged
merged 2 commits into from
Mar 15, 2024

Conversation

rebornix
Copy link
Member

No description provided.

@rebornix rebornix enabled auto-merge March 15, 2024 21:18
@rebornix rebornix self-assigned this Mar 15, 2024
@VSCodeTriageBot VSCodeTriageBot added this to the March 2024 milestone Mar 15, 2024
@@ -293,8 +294,9 @@ export class InlineChatWidget {
const widgetToolbarWidth = getTotalWidth(this._elements.widgetToolbar);
const innerEditorWidth = widgetDim.width - widgetToolbarWidth;
const inputDim = new Dimension(innerEditorWidth, this._inputWidget.getPreferredSize().height);
if (!this._lastDim || !Dimension.equals(this._lastDim, widgetDim)) {
if (!this._lastDim || !Dimension.equals(this._lastDim, widgetDim) || !this._lastInputDim || !Dimension.equals(this._lastInputDim, inputDim)) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the toolbar updates later than the widget, we didn't get a chance to trigger layout again it seems. Thus I added the cache for the input to ensure that it can get updated correctly. cc @jrieken

image

@rebornix rebornix merged commit 5ac16f4 into main Mar 15, 2024
7 checks passed
@rebornix rebornix deleted the rebornix/diplomatic-crab branch March 15, 2024 21:35
chen-ky pushed a commit to chen-ky/vscode that referenced this pull request Mar 18, 2024
…c-crab

Adopt InlineChatWidget in notebook and fix UI glitches.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants