Skip to content
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

Hover with custom HTMLElement sets a fixed height, cutting off contents #242377

Open
bpasero opened this issue Mar 1, 2025 · 4 comments · May be fixed by #242702
Open

Hover with custom HTMLElement sets a fixed height, cutting off contents #242377

bpasero opened this issue Mar 1, 2025 · 4 comments · May be fixed by #242702
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug papercut 🩸 A particularly annoying issue impacting someone on the team workbench-hover Hover issues in the workbench
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Mar 1, 2025

This makes debugging quite hard:

Image
@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug workbench-hover Hover issues in the workbench labels Mar 1, 2025
@benibenj
Copy link
Contributor

benibenj commented Mar 3, 2025

Can you repro when using copilot pro? I'm not able to repro in that case:

Image

@bpasero
Copy link
Member Author

bpasero commented Mar 3, 2025

@benibenj yes, if its large enough:

Image

@benibenj
Copy link
Contributor

benibenj commented Mar 3, 2025

Seems like we are setting a max height for the hover. @Tyriar I find it a bit odd that we just hardcode a max height to 50% of the window. I think hovers should be allowed to take more than 50% of the height on small screens.

private adjustHoverMaxHeight(target: TargetRect): void {
let maxHeight = this._targetWindow.innerHeight / 2;

@bpasero It looks like it is expected that you make your hover widget scrollable to support this case.

@bpasero bpasero changed the title Hover with custom HTMLElement computes wrong height with devtools opened Hover with custom HTMLElement sets a fixed height, cutting off contents Mar 5, 2025
@bpasero bpasero added this to the March 2025 milestone Mar 5, 2025
@bpasero
Copy link
Member Author

bpasero commented Mar 5, 2025

I think we should increase this limit to avoid having to make it scrollable or define an option for it.

Moving to march, because this is very much visible in floating windows that are typically smaller in size:

Image

@bpasero bpasero added the papercut 🩸 A particularly annoying issue impacting someone on the team label Mar 5, 2025
@benibenj benibenj linked a pull request Mar 5, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug papercut 🩸 A particularly annoying issue impacting someone on the team workbench-hover Hover issues in the workbench
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@bpasero @Tyriar @benibenj and others