Skip to content

Comments

chat: show ask-questions header as title, full question text below with multi-line options#296902

Draft
digitarald wants to merge 1 commit intomainfrom
chat/ask-questions-header-question-layout
Draft

chat: show ask-questions header as title, full question text below with multi-line options#296902
digitarald wants to merge 1 commit intomainfrom
chat/ask-questions-header-question-layout

Conversation

@digitarald
Copy link
Contributor

@digitarald digitarald commented Feb 23, 2026

Summary

I keep having long questions and answers where the UI simply hides too much vital information. If questions get complex, we should give them the room they need to be easy to understand and answer.

Before:

image

After:

image

Blocker, long answers need scrolling container:

image

Improves the vscode_askQuestions tool UI with a clearer two-tier layout:

  • Header bar: shows the short header parameter as a compact plain-text title (same height as the footer, matching 4px top/bottom padding)
  • Question body: shows the full question parameter text below the header — supports multi-line and markdown, with proper wrapping
  • Options list: answers are no longer truncated to a single line; labels wrap across multiple lines with number badges top-aligned

Changes

chatQuestionCarouselPart.ts

  • Split the combined questionText = message ?? title rendering into two separate elements: question.title → header bar (plain text), question.message → new .chat-question-message block below header (markdown-aware)
  • Removed the old parentheses/subtitle-splitting logic (chat-question-title-main / chat-question-title-subtitle) — no longer needed

chatQuestionCarousel.css

  • Header row: padding-top: 4px; padding-bottom: 4px to match footer height; removed container's padding-top
  • New .chat-question-message rule: padding-top: 8px, body-s font, word-wrap: break-word, line-height: 1.4, with .rendered-markdown link/paragraph styles
  • Options list: align-items: flex-start on list items for top-aligned badges; label changed from white-space: nowrap / text-overflow: ellipsis to word-wrap: break-word + padding-top: 2px

Copilot AI review requested due to automatic review settings February 23, 2026 04:08
@digitarald digitarald self-assigned this Feb 23, 2026
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 improves the vscode_askQuestions tool UI by separating the question display into a two-tier layout: a compact header bar showing the short title parameter, and a separate message body showing the optional message parameter with multi-line and markdown support. Options in the list can now wrap across multiple lines with top-aligned number badges.

Changes:

  • Split question rendering into separate header (title) and body (message) sections
  • Added support for multi-line option labels with proper badge alignment
  • Removed obsolete parentheses-splitting logic for subtitles

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
chatQuestionCarouselPart.ts Refactored to render title in header bar and message in separate body element with markdown support; removed parentheses-splitting logic
chatQuestionCarousel.css Adjusted padding for header/footer alignment, added .chat-question-message styles, changed list items to flex-start alignment for multi-line labels

Comment on lines +506 to +516
// Render full question text below the header row (supports multi-line and markdown)
if (question.message) {
const messageEl = dom.$('.chat-question-message');
if (isMarkdownString(question.message)) {
const renderedMessage = questionRenderStore.add(this._markdownRendererService.render(MarkdownString.lift(question.message)));
messageEl.appendChild(renderedMessage.element);
} else {
messageEl.textContent = this.getQuestionText(question.message);
}
this._questionContainer.appendChild(messageEl);
}
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

The existing test at line 89-106 in chatQuestionCarouselPart.test.ts expects markdown content to be rendered inside .chat-question-title, but this change moves markdown rendering from message to a new .chat-question-message element. This will cause the test "renders markdown in question message" to fail because it queries for .chat-question-title .rendered-markdown. The test needs to be updated to query .chat-question-message instead when checking markdown rendering.

Copilot uses AI. Check for mistakes.
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.

1 participant