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

Always render linter's tooltip inside of viewport #7044

Closed
wants to merge 3 commits into from

Conversation

benjaminr-ps
Copy link
Contributor

@benjaminr-ps benjaminr-ps commented Jun 29, 2023

The following shows, if the linter's tooltip is exceeding the viewport:
image

The following shows the fixed version:
image

This is a very quick solution, fixing that particular corner case, shown in the screenshot.
Or course, we would appreciate a more mature solution to this problem in general.

@benjaminr-ps
Copy link
Contributor Author

What can we do about to prioritize?

@marijnh
Copy link
Member

marijnh commented Jul 17, 2023

There is already code that does something like this in the library. Figuring out why it doesn't do what you want in this case would be the thing to do. Code that adds another layout cycle to every tooltip update, as this does, is definitely not going to be merged.

I have adapted the implementation to only have one cycle and slightly simplified.

Please adapt as you like it of course.
Fix build's linting issues
@benjaminr-ps
Copy link
Contributor Author

Please let me know if any changes needed for merge, or if I should squash.

@marijnh
Copy link
Member

marijnh commented Jul 21, 2023

Attached patch simplifies this a bit and reduces the number of reflows the code causes. Does it work for you?

@benjaminr-ps
Copy link
Contributor Author

Yes, works like a charm, thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants