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

Force details text to be anchored to top of window #257

Open
ezyang opened this issue Sep 11, 2022 · 4 comments
Open

Force details text to be anchored to top of window #257

ezyang opened this issue Sep 11, 2022 · 4 comments

Comments

@ezyang
Copy link

ezyang commented Sep 11, 2022

Some applications can produce very deep flamegraphs, for which vertical scrolling is needed. When this occurs, it is difficult to view the title annotations on elements, as the normal details text is no longer in the viewport. To make matters worse, the details text is most useful for small elements, which are usually the furthest away from details. Yes, we can click to zoom in, but sometimes you just want to mouse around and see what's up.

I have a hacked up one of inferno's generated flamegraph svg's with https://stackoverflow.com/questions/2192209/keep-an-svg-object-static-while-scrolling to keep the detail viewport attached. It looks quite nice. See:

image

I would like to know if you would accept a PR adding this functionality by default to inferno. If so, I'll take the time to update inferno to include these updates directly. The modifications are modest: the detail svg has to be moved to the end of the document so that it paints over all other elements, and you need some JavaScript to adjust its location when you scroll.

@jonhoo
Copy link
Owner

jonhoo commented Sep 17, 2022

Yes, this seems like a useful addition! It'd be useful to see before/after though.

@ezyang
Copy link
Author

ezyang commented Sep 18, 2022

Err, what kind of before/after are you looking for? Before the line is not visible haha

@jonhoo
Copy link
Owner

jonhoo commented Sep 18, 2022

Isn't the line shown before you start scrolling currently, or am I misremembering?

@ezyang
Copy link
Author

ezyang commented Sep 18, 2022

Yes, so it's at the top of the svg and when you scroll down it scrolls out of view

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants