Skip to content

fix: enable text wrapping in parameter hints widget#293558

Open
kairosci wants to merge 2 commits intomicrosoft:mainfrom
kairosci:fix/parameter-hints-wrapping
Open

fix: enable text wrapping in parameter hints widget#293558
kairosci wants to merge 2 commits intomicrosoft:mainfrom
kairosci:fix/parameter-hints-wrapping

Conversation

@kairosci
Copy link

@kairosci kairosci commented Feb 6, 2026

Add white-space: pre-wrap, word-wrap and overflow-wrap properties to parameter hints .code and .signature classes to allow long parameter descriptions and signatures to wrap instead of overflowing.

This fixes an issue where long parameter hints were not wrapped, making them unreadable when they extended beyond the visible area. Only vertical scrolling was available, not horizontal, which made navigation difficult.

Fixes #142888

Add white-space: pre-wrap, word-wrap and overflow-wrap properties to
parameter hints .code and .signature classes to allow long parameter
descriptions and signatures to wrap instead of overflowing.

Fixes microsoft#142888
Copilot AI review requested due to automatic review settings February 6, 2026 23:49
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

Enables wrapping for long content in the editor’s parameter hints (signature help) widget so signatures/descriptions don’t overflow the visible area.

Changes:

  • Add wrapping-related CSS (white-space: pre-wrap, word-wrap, overflow-wrap) to the parameter hints widget .code content.
  • Add word breaking rules to the .signature container to prevent long signatures from overflowing.

Comment on lines 56 to 61
.monaco-editor .parameter-hints-widget .signature {
padding: 4px 5px;
position: relative;
word-wrap: break-word;
overflow-wrap: break-word;
}
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The linked issue (#142888) describes hover tooltip content (“When I hover over … the displayed docstring is not wrapped”), but this change only updates the parameter hints widget CSS. Please confirm this PR is meant to fix parameter hints (signature help) and update the issue reference/description accordingly, or apply the fix to the hover widget if that’s the actual repro.

Copilot uses AI. Check for mistakes.
Comment on lines 74 to 79
.monaco-editor .parameter-hints-widget .code {
font-family: var(--vscode-parameterHintsWidget-editorFontFamily), var(--vscode-parameterHintsWidget-editorFontFamilyDefault);
white-space: pre-wrap;
word-wrap: break-word;
overflow-wrap: break-word;
}
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

Now that .parameter-hints-widget .code sets white-space: pre-wrap, the later rule .parameter-hints-widget .docs .code { white-space: pre-wrap; } becomes redundant for .code. Consider removing the redundant selector (or narrowing this .code rule to the signature area) to avoid confusion about which rule is expected to control wrapping.

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.

Long parameter hints are not wrapped

2 participants