Skip to content

Conversation

@eli-w-king
Copy link
Contributor

@eli-w-king eli-w-king commented Oct 3, 2025

CSS solution for responsive chat panel

Screen.Recording.2025-10-03.at.3.42.59.PM.mov

@eli-w-king eli-w-king marked this pull request as ready for review October 3, 2025 22:46
Copilot AI review requested due to automatic review settings October 3, 2025 22:46
@eli-w-king eli-w-king added ux User experience issues chat labels Oct 3, 2025
@eli-w-king eli-w-king added this to the September 2025 milestone Oct 3, 2025
@eli-w-king eli-w-king enabled auto-merge October 3, 2025 22:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a CSS solution to improve the responsiveness of the chat panel's welcome view by preventing content overlap at various screen sizes and viewport dimensions.

  • Updates flexbox properties and spacing for better responsive layout behavior
  • Adds progressive media queries that hide non-essential welcome content at smaller viewport sizes
  • Changes "Chat history..." text to "More history..." for brevity

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 11 comments.

File Description
src/vs/workbench/contrib/chat/browser/media/chatViewWelcome.css Implements responsive CSS with media queries and updates flexbox layout for suggested prompts
src/vs/workbench/contrib/chat/browser/chatWidget.ts Updates history link text from "Chat history..." to "More history..."

/* Responsive fallbacks to avoid overlapping welcome content */

@media screen and (max-height: 760px), screen and (max-width: 620px) {
.interactive-session:not(:has(.chat-welcome-view-icon .codicon-send-to-remote-agent)) .chat-welcome-view-container:has(.chat-welcome-view-suggested-prompts > .chat-welcome-view-suggested-prompt:nth-of-type(2)) div.chat-welcome-view > .chat-welcome-view-title {
Copy link

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

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

The CSS selector is extremely complex and nested, making it difficult to maintain. Consider breaking this into smaller, more specific classes or using CSS custom properties to simplify the targeting logic.

Copilot uses AI. Check for mistakes.

/* Responsive fallbacks to avoid overlapping welcome content */

@media screen and (max-height: 760px), screen and (max-width: 620px) {
Copy link

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

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

The media query breakpoints use magic numbers without explanation. Consider defining these breakpoints as CSS custom properties with descriptive names to improve maintainability and make the responsive design intent clearer.

Copilot uses AI. Check for mistakes.
}
}

@media screen and (max-height: 720px), screen and (max-width: 580px) {
Copy link

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

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

The media query breakpoints use magic numbers without explanation. Consider defining these breakpoints as CSS custom properties with descriptive names to improve maintainability and make the responsive design intent clearer.

Copilot uses AI. Check for mistakes.
}
}

@media screen and (max-height: 680px), screen and (max-width: 540px) {
Copy link

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

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

The media query breakpoints use magic numbers without explanation. Consider defining these breakpoints as CSS custom properties with descriptive names to improve maintainability and make the responsive design intent clearer.

Copilot uses AI. Check for mistakes.
}
}

@media screen and (max-height: 640px), screen and (max-width: 500px) {
Copy link

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

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

The media query breakpoints use magic numbers without explanation. Consider defining these breakpoints as CSS custom properties with descriptive names to improve maintainability and make the responsive design intent clearer.

Copilot uses AI. Check for mistakes.
@joaomoreno
Copy link
Member

@eli-w-king @digitarald @bhavyaus we're done with September changes. Moving this out to October...

@eli-w-king eli-w-king requested a review from bpasero October 9, 2025 21:59
}

@media screen and (max-height: 720px), screen and (max-width: 580px) {
.interactive-session:not(.new-welcome-view):not(:has(.chat-welcome-view-icon .codicon-send-to-remote-agent)) .chat-welcome-view-container:has(.chat-welcome-view-suggested-prompts > .chat-welcome-view-suggested-prompt:nth-of-type(2)) div.chat-welcome-view > .chat-welcome-view-icon {
Copy link
Collaborator

@bhavyaus bhavyaus Oct 10, 2025

Choose a reason for hiding this comment

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

  • These selectors are very complex. We coul simplify them to target just the specific elements (.chat-welcome-view-icon, .chat-welcome-view-disclaimer, etc.).
  • The screen qualifier isn’t needed here since it’s the default I think.
  • Also, how are we choosing the max-height and max-width breakpoints?

Copy link
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

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

Overall I wonder if we couldn't achieve this easily without CSS (which comes at a cost) by simply updating the visibility of elements from within our layout call, where we know exactly what kind of height and width the view gets:

layout(height: number, width: number): void {

font-size: 14px;
font-weight: 600;
font-size: 13px;
font-weight: 500;
Copy link
Member

Choose a reason for hiding this comment

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

Can we remove use of font-weight altogether? I think it still works without it well given the color.


/* Responsive fallbacks to avoid overlapping welcome content */

.interactive-session:not(.new-welcome-view):not(:has(.chat-welcome-view-icon .codicon-send-to-remote-agent)) {
Copy link
Member

Choose a reason for hiding this comment

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

I am a bit worried about the perf of this selector, is there a way we can avoid :has that seems to check on every child element recursively?

Copy link
Collaborator

Choose a reason for hiding this comment

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

+1. We've already broken down the selector for new-welcome-view etc above. Most of these can be nested under there.

/* Responsive fallbacks to avoid overlapping welcome content */

.interactive-session:not(.new-welcome-view):not(:has(.chat-welcome-view-icon .codicon-send-to-remote-agent)) {
.chat-welcome-view-container:has(.chat-welcome-view-suggested-prompts > .chat-welcome-view-suggested-prompt:nth-of-type(2)) {
Copy link
Member

Choose a reason for hiding this comment

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

Same here.

@eli-w-king
Copy link
Contributor Author

Revised prompt width and styling here: #271399

@eli-w-king eli-w-king changed the title Responsive chat panel css, revised prompt titles Responsive chat panel (dynamic compression) Oct 15, 2025
@eli-w-king eli-w-king requested a review from bpasero October 20, 2025 21:47
@bhavyaus bhavyaus added ~info-needed Issue requires more information from poster (with bot comment) and removed ~info-needed Issue requires more information from poster (with bot comment) labels Oct 22, 2025
@vs-code-engineering vs-code-engineering bot added the info-needed Issue requires more information from poster label Oct 22, 2025
@vs-code-engineering
Copy link

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.

For Copilot Issues, be sure to visit our Copilot-specific guidelines page for details on the necessary information.

Happy Coding!

Copy link
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

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

I would suggest to revisit this in November 🙏

@bpasero bpasero removed the info-needed Issue requires more information from poster label Nov 1, 2025
@bpasero bpasero modified the milestones: October 2025, November 2025 Nov 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chat ux User experience issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chat placeholder not responsive to smaller height windows

6 participants