dotnet / dotnet/vscode-csharp

[BUG] Method definition in 'suggest' widget is truncated

Open
#8,076 3 comments 2 reactions 0 assignees View on GitHub
Bug
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
17h 56m
Merged PRs (30d)
21

Description

Originally filed by @sliekens at https://github.com/microsoft/vscode-dotnettools/issues/1356

### Describe the Issue

When you view the IntelliSense documentation of a C# method in the 'suggest' widget, the method definition is truncated. There is no text wrapping, nor is it possible to scroll horizontally. The only way to view the full method definition is to resize the widget.

### Steps To Reproduce

https://github.com/user-attachments/assets/e4c312c8-ece8-4699-8221-4cbb603a70a1

### Expected Behavior

I've seen other language providers put the method definition in the header element of the suggest widget, which has a `white-space: pre-wrap` CSS style, so the method definition will wrap when necessary (and on line breaks).

JS example from https://code.visualstudio.com/docs/editor/intellisense:

(By the way, here the method definitions are displayed in a grey color without syntax highlighting.)

![intellisense_docs](https://github.com/user-attachments/assets/4a6c8f5d-90de-4825-b9e1-0e90d1cd42f9)

### Discussion
> Indeed, your observations are correct. We can move the method definition into the header, which improves the wrapping a bit. However then the colorization gets lost: ![image](https://github.com/user-attachments/assets/a484927a-c96c-4900-9d0e-846f19cd43ca)
>
> I'm not sure there is a lot we can do on the extension side, we may need assistance from VSCode here so that we can keep colorization while also improving the wrapping behavior.

### Environment Information

Version: 1.92.1 (user setup)
Commit: eaa41d57266683296de7d118f574d0c2652e1fc4
Date: 2024-08-07T20:16:39.455Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.22631

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.