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

Hovering over flamegraph in sandwich view causes label to get cut off #256

Closed
nightpool opened this issue Feb 6, 2020 · 2 comments · Fixed by #395
Closed

Hovering over flamegraph in sandwich view causes label to get cut off #256

nightpool opened this issue Feb 6, 2020 · 2 comments · Fixed by #395

Comments

@nightpool
Copy link

Actual behavior:

image

Expected behavior:

image

Seems like the issue is caused by some overly-strict overflow: hidden styles on the containing blocks. Maybe it would be better to use a Portal to render the tooltip into a part of the dom that doesn't have overflow: none applied? Or remove the overflow: hidden styles

@nightpool
Copy link
Author

I made a small, hacky userscript to solve the issue on speedscope.app (obviously will break when css gets regenerated) https://gist.githubusercontent.com/nightpool/6a3d5218436295c6fafa991d30409f5a/raw/speedscope_tooltip_fix.user.css

@jlfwong
Copy link
Owner

jlfwong commented Feb 7, 2020

Oh jeez, good catch. This is definitely a bug.

I'd accept a PR to fix this issue.

I agree that having it clipped by the container isn't great, but it seems like there's something wrong with the heuristic deciding whether the tip should be to the left or the right of the cursor. I suspect that fixing that will fix the problem in the majority of cases. (e.g. in the screenshot you show, the problem would be resolved if the tooltip was to the right of the cursor instead of left).

jlfwong added a commit that referenced this issue May 17, 2022
This changes the HoverTip placement logic to use measurements from the actual DOM node rather than basing everything on the maximum sizes.

This avoids some counter-intuitive behaviour, most importantly situations where the label would overflow off the left side of the screen for no obvious reason.

Fixes #394
Fixes #256
jackerghan pushed a commit to jackerghan/speedscope that referenced this issue Jul 28, 2023
This changes the HoverTip placement logic to use measurements from the actual DOM node rather than basing everything on the maximum sizes.

This avoids some counter-intuitive behaviour, most importantly situations where the label would overflow off the left side of the screen for no obvious reason.

Fixes jlfwong#394
Fixes jlfwong#256
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants