-
Notifications
You must be signed in to change notification settings - Fork 947
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
Add event listener for resize events #3124
Add event listener for resize events #3124
Conversation
Fixes #2467 |
@ibdafna, thanks for looking into this. I think we should register the handler in the classic notebook widget manager once, then when it is triggered, have the classic notebook manager go through each of the top-level widgets and trigger the lumino event. And probably do the same for the html manager. The way things are set up right now in this PR, it looks like every widget will register a handler with window (whether it needs to or not). @ibdafna - I'm happy to connect over video to walk through this if you want. |
Thank you - yes, I'll reach out! |
cfe0537
to
967beac
Compare
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.
Thanks! I found a few things while testing, noted below.
4e1ea6d
to
2cc02ac
Compare
FYI, I rebased on master |
29541a9
to
05940d9
Compare
This lets us use the html manager window resize logic.
@ibdafna - I rebased and fixed a few issues with the examples, and checked manually that the resize event is now happening for the classic notebook and the html manager. Thanks again! |
See github.com/jupyter-widgets/ipywidgets/pull/3124 for resize change rationale
See jupyter-widgets/ipywidgets/pull/3124 for resize change rationale
This PR adds an event listener so that
lumino
based widgets rendered in a classic notebook can receive a resize message when a window resize event triggers.