Repository navigation
chat: make askQuestions carousel more compact - #336712
jipeng (guhou-hvi) wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Hidden descriptions currently lack equivalent visible access for keyboard-only users.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Compacts the chat question carousel to preserve conversation context.
Changes:
- Reduces the carousel’s maximum height.
- Hides inline option descriptions while retaining hover text.
File summaries
| File | Description |
|---|---|
chatQuestionCarousel.css |
Compacts carousel height and option rows. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| } | ||
|
|
||
| .chat-question-list-label-desc { | ||
| display: none; |
|
Addressed the keyboard-only access concern in \1357953: the description is now revealed via CSS on .selected\ (single-select keyboard-active row) and :focus/:focus-within\ (multi-select focused row), so navigating with the keyboard shows the description inline the same way a mouse hover does. Screen-reader access was already preserved because each row's \�ria-label\ carries the full 'Option N: Title - Description' text independent of the visual span. |
Problem
The
vscode/askQuestionstool renders a question carousel above the chat input. When options have descriptions (the common "clarifying questions with recommended defaults" pattern), each option row expands to two lines — the option title plus its explanation — and the card's outermax-heightis45vh. The result: the card occupies most of the chat area, hiding the agent's prior output the user is still reading.CLI agents like Codex present the same information more efficiently: the option list shows only the short titles, and the description appears as a hover tooltip on the row the user is actually looking at.
Change
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css— two lines:.chat-question-list-label-desc { display: none; }).max-heightfrommin(420px, 45vh)tomin(300px, 35vh).That's the entire diff. The hover tooltip is already in place:
renderSingleSelect/renderMultiSelectcall_hoverService.setupDelayedHover(listItem, { content: option.label, position: HoverPosition.BELOW }), andoption.labelcarries the full"Title - Description"string that the carousel splits into two DOM spans. So hiding the second span removes the inline duplication while preserving the complete text on hover.Accessibility
The description must stay reachable without a mouse:
"Option N: Title - Description"set viaaria-labelon the list item, independent of the visual span..selected(single-select sets it on the keyboard-active row throughChatCardListbox.setActive) and on:focus/:focus-within(multi-select moves real DOM focus to the row). So the row you are navigating to shows its description inline, matching what a mouse hover reveals.Behavior / Risk
AskQuestionsTool, the data model, keyboard navigation, selection, submit, or draft persistence.renderSummary/renderConversationSummary).Files
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.cssTests
N/A (CSS-only UI change).
Fixes #336708