-
Notifications
You must be signed in to change notification settings - Fork 29.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Horizontal space is not being used fully by the test message #123927
Comments
@mjbvz this is a bug in the hover itself (testing just uses the default hovers). Notice that the long method name/path increases the size of the hover, but its contents don't grow to fit/the name doesn't scroll.
|
@connor4312 I'm maintaining the hover but would appreciate a PR / some simpler repro steps maybe with a trivial extension that just registers a hover provider with the same markdown content. |
@alexdima You can use this sample project: https://github.com/jdneo/vscode-extension-samples/tree/cs/vscode-issue-123927/test-provider-sample.
See below video: Video1.mp4 |
Thank you for the repro. Here is a further reduced repro for an extension that can be placed in the user extensions dir:
{
"name": "123927",
"publisher": "alex",
"version": "1.0.0",
"engines": {
"vscode": "^1.22.0"
},
"activationEvents": [
"*"
],
"main": "index.js"
}
const vscode = require("vscode");
exports.activate = function () {
vscode.languages.registerHoverProvider(
{ scheme: "file" },
{
provideHover: () => {
const markdownString = new vscode.MarkdownString();
markdownString.appendCodeblock(
"void org.springframework.samples.petclinic.model.ValidatorTest.shouldNotValidateWhenFirstNameEmpty()",
"java"
);
return new vscode.Hover(markdownString);
},
}
);
vscode.languages.registerHoverProvider(
{ scheme: "file" },
{
provideHover: () => {
const markdownString = new vscode.MarkdownString();
markdownString.isTrusted = true;
markdownString.appendText(
"this is just a fake lonnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnng [message](https://github.com/microsoft/vscode/issues/123927#issuecomment-853149197)"
);
return new vscode.Hover(markdownString);
},
}
);
}; |
Hello @alexdima, is this issue is still open, I am new to open source and wanted to contribute. |
I played around with this. I'm not sure it's possible to fix this with the way word wrapping works. At least not without manually doing width/height computation on elements. |
This is a tricky situation for an edge case. I'm leaning towards closing this as *wontfix; I can't figure a way to do this in CSS and manually laying it out with JS will add a deal of complexity and is likely to be error-prone. |
Does this issue occur when all extensions are disabled?: Yes/No
Version: 1.57.0-insider
Commit: 40d5e67
Date: 2021-05-14T21:31:25.085Z
Electron: 12.0.7
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Darwin x64 20.4.0
Steps to Reproduce:
// #122208 (comment)
The text was updated successfully, but these errors were encountered: