-
Notifications
You must be signed in to change notification settings - Fork 19
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
fix: support ipywidget sliders in save_animation #182
Conversation
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.
Ok I've thought about this a little bit more. I think the underlying issue is that I lumped the test for being ipywidgets together with the test for if it was automatically created. This is leading to you duplicating the N
,min_
... code. I think a more reasonable flow would be:
# test if this is an autogenerated slider
if "Box" in str(slider...)
# loop over children of the box
slider = ....
if not _not_ipython and isinstance(slider, [FloatSlider, IntSlider):
...
elif isinstance(slider, mSlider):
...
Would you mind changing the implementation to be like that? (Or convince me that something else is better!)
Ideally none of these should throw an error
I took the liberty of adding a test with mixed slider types to make sure that they all work. |
#182 (comment) #182 (review) |
oooh hooray the tests caught that! they are good for something 🎉 |
Thanks @redeboer ! I'll make a new release shortly. @all-contributors please add @redeboer for code and userTesting |
I've put up a pull request to add @redeboer! 🎉 |
Closes #181
These are the changes required to get the snippet from #181 to work. Feel free to close this PR if it has any undesired consequences or does not comply with the design of the package.