-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Replace most jQuery with vanilla JavaScript #17053
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
Conversation
I went over this with @dorafc who signed off on the JS. Did local testing, something is broken with nabagg as closing the figure on the python side does not close the js side, but that is also broken on master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something is broken with using webagg from the terminal, investigating.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed a fix for the issue I found.
@QuLogic can merge if happy with this.
The circle failure is due to the dateutil inventory not downloading and travis is due to a weird wx import error. |
Circle might be helped a bit by caching in #17183. |
This was done in ipympl, so is easier to compare if the same here.
This can be done with CSS selectors, so there's no need to add a class via JS. The hover effect seems to work without it anyway.
This is a mix of the change in ipympl, plus the same thing for our original version of other stuff. Fixes matplotlib#14596.
Otherwise the quotes get escaped during the templating process which results in invalid html/js being served.
PR Summary
This is a mix of the change in ipympl, plus the same thing for our original version of other stuff, using stuff like http://youmightnotneedjquery.com/ and this cheat sheet. Unfortunately, we can't just remove jQuery, because we have jquery-ui for the CSS and resizable handles. CSS is easy, and we can replace the handles without too much code (since we don't need its full flexibility), but this was large enough already.
Fixes #14596.
Waiting on the JS style fix PR.PR Checklist