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

InfoView popups need scrollability #210

Closed
lovettchris opened this issue Jul 6, 2022 · 2 comments
Closed

InfoView popups need scrollability #210

lovettchris opened this issue Jul 6, 2022 · 2 comments
Labels
enhancement New feature or request high priority

Comments

@lovettchris
Copy link
Contributor

lovettchris commented Jul 6, 2022

Some large markdown comment blocks require scrolling like this, which you will see in the editor tips:

image

Today the infoview will render large popups off the bottom or off the top of the infoview:

image

or

image

and the vertical size will be infinite with no nested scrollbar inside the tip. I think a fixed max vertical height with scrollbars when needed would be nicer especially because of the flip() limitations in Popper v2.x mentioned in #207

@leodemoura leodemoura added the nice to have It would be great to have or fix, but it is not essential. label Jul 6, 2022
@lovettchris
Copy link
Contributor Author

@Vtec234 says
Fwiw, I tried floating-ui in the infoview a while ago and it was completely not working. However it looks like they have added a whole lot of utilities since then and presumably fixed bugs, so it might be worth giving another go, if we can reproduce all existing functionality using it (it would be a large change).

@lovettchris
Copy link
Contributor Author

The flip logic is completely lacking any concept of "best" orientation based on "minimal offscreen" amounts. Instead it is a binary switch, if "bottom" results in any amount off the bottom then don't use it which is a not the best algorithm for large hover tips, and turns out off the bottom in the InfoView is fine because the InfoView itself is scrollable, so it's easy to read the hover tip with some vertical scrolling, off the top is much worse because the InfoView scrollbar won't go negative.

The flip() implementation in Popper v2 is also impossible to replace as far as I can tell, but I've noticed Popper seems to be replaced now by https://github.com/floating-ui/floating-ui which looks much better because it gives you much more control over the middleware (e.g. flip function etc). It also claims to be smaller and lighter so we should be able to implement a more InfoView friendly flip algorithm very easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority
Projects
None yet
Development

No branches or pull requests

4 participants