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

Popup covers the area where a student is typing #826

Closed
cdsmith opened this issue Feb 8, 2019 · 5 comments
Closed

Popup covers the area where a student is typing #826

cdsmith opened this issue Feb 8, 2019 · 5 comments
Labels

Comments

@cdsmith
Copy link
Collaborator

cdsmith commented Feb 8, 2019

The documentation popup is in an inconvenient place. When you've typed a function and want to know the arguments, it's logical to hover over that function name. But that puts the popup tooltip right over the text cursor, so you can't see. You have to move the mouse back and forth on and off the function name.

@cdsmith cdsmith added the bug label Feb 8, 2019
@cdsmith
Copy link
Collaborator Author

cdsmith commented Feb 8, 2019

image

@cdsmith
Copy link
Collaborator Author

cdsmith commented Feb 8, 2019

@nixorn FYI. This looks hard in general. The popup is relative to the mouse pointer, but the request here is that if it would cover up the text cursor, we try different placement rules to avoid this. Might require a change in the hover plugin?

I'll look into it if you don't get to it, so please update the bug if you discover anything.

@cdsmith
Copy link
Collaborator Author

cdsmith commented Feb 9, 2019

I've been looking at other popups, and noticed that a common rule seems to be "pop up above the element if possible... otherwise below the element". That seems like an improvement to me. I'd also like the popup to be relative to the span, not the mouse pointer. I think those two changes together would solve this problem.

@nixorn
Copy link
Contributor

nixorn commented Feb 10, 2019

Looks this really requires changes to addon. Code which updates positions of hover here https://github.com/angelozerr/CodeMirror-Extension/blob/master/addon/hover/text-hover.js#L15
I going to fork this repo, make changes + PR, and make npm in https://github.com/google/codeworld/blob/master/install.sh#L256 install addon from my github.

@nixorn
Copy link
Contributor

nixorn commented Feb 10, 2019

related issue angelozerr/CodeMirror-Extension#4

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

No branches or pull requests

2 participants