Skip to content

Commit

Permalink
Avoid setting a negative padding on the chat welcome view container (#…
Browse files Browse the repository at this point in the history
…229996)

The layout here is a bit weird to avoid shifting when followups appear. If the followups wrap, then the layout is messed up because negative padding is not allowed. I might try to simplify this for next month.
Fix microsoft/vscode-copilot#8749
  • Loading branch information
roblourens committed Sep 27, 2024
1 parent 03442d1 commit 1b22d60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/chat/browser/chatWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ export class ChatWidget extends Disposable implements IChatWidget {
this.tree.getHTMLElement().style.height = `${listHeight}px`;

// Push the welcome message down so it doesn't change position when followups appear
const followupsOffset = 100 - this.inputPart.followupsHeight;
const followupsOffset = Math.max(100 - this.inputPart.followupsHeight, 0);
this.welcomeMessageContainer.style.height = `${listHeight - followupsOffset}px`;
this.welcomeMessageContainer.style.paddingBottom = `${followupsOffset}px`;
this.renderer.layout(width);
Expand Down

0 comments on commit 1b22d60

Please sign in to comment.