microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.34k stars 28.9k forks source link

Debug console sticky scroll is much larger than its content #223383

Open Tyriar opened 2 months ago

Tyriar commented 2 months ago

Repro:

A logged a large array when testing a proposed API and saw this:

Screenshot 2024-07-23 at 1 57 41 PM

Code:

    const disposable = vscode.commands.registerCommand('test.helloWorld', async () => {
        const result = await vscode.workspace.findFiles2New(["**/*.ts"]);
        console.log(result);
    });
connor4312 commented 2 months ago

This element uses dynamic heights, since the actual height of the element with word-wrap on is not known until it's rendered, but poking through some code it doesn't look like sticky scroll supports dynamic height yet. We'd want to either do that, or pass some signalling to the renderer/delegate to render the sticky node without word wrap which would probably be good for this use case.

https://github.com/microsoft/vscode/blob/13390b31d7a1f511327b440594a551bbdd62f27d/src/vs/workbench/contrib/debug/browser/replViewer.ts#L318