Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix resizing in nbAgg. #19746

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

Merged
merged 1 commit into from
Mar 22, 2021
Merged

Fix resizing in nbAgg. #19746

merged 1 commit into from
Mar 22, 2021

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Mar 19, 2021

PR Summary

The WebSocket wrapper around the IPython comm does not define readyState, and so resizes are never forwarded to the Python side.

PR Checklist

  • [n/a] Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • [n/a] New features are documented, with examples if plot related.
  • [n/a] Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • [n/a] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [n/a] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

The WebSocket wrapper around the IPython comm does not define
`readyState`, and so resizes are never forwarded to the Python side.
@QuLogic QuLogic added Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. GUI: nbagg labels Mar 19, 2021
@QuLogic QuLogic added this to the v3.4.0 milestone Mar 19, 2021
@jklymak
Copy link
Member

jklymak commented Mar 22, 2021

How do we test this? Is this @ianhi issue?

@ianhi
Copy link
Contributor

ianhi commented Mar 22, 2021

Is this @ianhi issue?

@jklymak how do you mean?

I think this is a follow up to: #19131. In particular this commit: 725e908 which changed things in the webagg js which nbagg relies on.

How do we test this?

Run the UAT test in lib/matplotlib/backends/web_backend. Everything should still work ideally, and when manually resizing the figure should update.

One thing that I've been adding for lots of repos working with widgets is a github bot that comments on PRs with a binder link. In this case that link is:
https://mybinder.org/v2/gh/qulogic/matplotlib/fix-nbagg-resize?filepath=lib/matplotlib/backends/web_backend/nbagg_uat.ipynb

with the more general case described here: https://mybinder.readthedocs.io/en/latest/howto/gh-actions-badges.html

I'll bet that that script could be modified to check if any files in web_backend have been modified and then comment the appropriate binder link

Copy link
Contributor

@ianhi ianhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me

@jklymak jklymak merged commit 9efccb3 into matplotlib:master Mar 22, 2021
@QuLogic QuLogic deleted the fix-nbagg-resize branch March 22, 2021 22:06
@tacaswell
Copy link
Member

@meseeksdev backport to v3.4.x

@tacaswell
Copy link
Member

@meeseeksdev backport to v3.4.x

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Mar 24, 2021
tacaswell added a commit that referenced this pull request Mar 24, 2021
…746-on-v3.4.x

Backport PR #19746 on branch v3.4.x (Fix resizing in nbAgg.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI: nbagg Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants