-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Remove jQuery & jQuery UI #17086
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
Remove jQuery & jQuery UI #17086
Conversation
Does this need a re-base now that the other PRs are merged? |
Yes, I'll rebase it. I'm also looking into a bug with resize on the notebook version. |
Okay, I think the problem is that in jQuery UI we had start/stop resize events in which we disabled mouse events, but we don't have those any more and get into some kind of loop between our resize and the user resize. I'll need to figure out a way to do that using the newer API. |
I've fixed webagg, but nbagg is broken and I'm not sure what's wrong. When opening a new figure, in webagg, it looks like:
In nbagg though, something else happens before all that, and it works like:
The height of the figure just grows and grows and grows after that, unless you grab the resizer with the mouse and shrink it a little. Then the loop stops and everything eventually syncs up together. 600x600 is the initial value given in the JavaScript, though it's strange that webagg ignores it. It's also strange that the height is 6.5 pixels taller than it should be. Initially, I thought the problem was that the notebook's CSS set all elements to I guess there's something in the notebook JavaScript that's resizing the |
Also, if I take out the initial sizing on the JavaScript side entirely, then something on the notebook resizes the div to 0x0, and then resizes it again to 300x156.5. I don't even know where those numbers come from. |
Pushing this to 3.4. |
Success! For me this now works in WebAgg, the embedding example, and the notebook. Maybe we can get it into 3.3 now. |
The save button does not work in nbagg, but works in the embedded webagg example and via |
It doesn't fail for me; is it popup-blocked or something? |
It appears to be browser dependent (works in firefox, does not work in brave). |
We only really need clearfix, and some kind of style for the header. We could drop these entirely, but it's necessary to use these names for compatibility with the nbAgg styles.
It's now unused, except specfically in the IPython inline figure HTML, but we know it's available there.
Resizing is really weird if they are aligned at the default bottom/baseline.
This reverts the notebook's blanket change of all elements to border-box sizing.
Directly resize the canvas when the container div is resized, instead of waiting for the message round-trip to Python. Set a minimum size to prevent positive-finite errors in the console.
power-cycled to pick up the new commits on master (to fix CI) |
PR Summary
This is the last step to removing jQuery and jQuery UI.
It's not totally finished yet, as the resizing is a bit broken in nbAgg (though okay with plain WebAgg.)I'm also not sure ifResizeObserver
is portable enough to rely on by itself (it's about 75% available on caniuse).Waiting on #17078.PR Checklist