-
Notifications
You must be signed in to change notification settings - Fork 11
Trigger layout invalidation on widget display #64
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
Trigger layout invalidation on widget display #64
Conversation
Sounds like while this solves the minimal working example, it doesn't address all use cases. Moving back into draft. |
@peytondmurray The changes here still make sense to me! You indicate that this solves the minimal example but not all cases, could you list some other cases that aren't solved by this because so far the issues I've seen primarily focus on the minimal example. |
To be honest, it's been a long time since I last looked at this. I remember looking at #58 and being able to reproduce the issue with the react widget described there, but I can't remember if there was some other issue that went unresolved. I'll send a message internally to see if I can get any more information. |
5dfa681
to
be5d7af
Compare
@philippjfr I've done my best to rebase this onto the latest commit on |
Thanks @peytondmurray and sorry I haven't gotten to this again. I'm happy to take this over so you don't have to fight the CI anymore. |
Hey, thanks! Not sure what was going on with the CI, but I bumped the versions of what workflows I could and it seems happy now :) |
@philippjfr I ran these tests locally but was unable to replace the issue in the CI here, though something else came up locally:
I tried running |
Should now be fixed on main, could you rebase? |
6cbe293
to
4f7f55c
Compare
Done, and the test suite is green. Thanks for the support! |
Thanks so much! |
Summary
This PR triggers layout invalidation when the widget is displayed, closing #58. See that issue for a complete discussion and examples.
Changes
onDisplay
callback to be passed to theWidgetManager.render
function which triggers when the view'sdisplayed
event is emitted.IPyWidgetView
, the widget manager'srender
function is passed a callback which invalidates the layout.