Skip to content
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 nested output widgets in voila executor #358

Merged

Conversation

maartenbreddels
Copy link
Member

Fixes #355

The issue boiled down to having nest output widgets like:

import ipywidgets as widgets
output1 = widgets.Output()
output2 = widgets.Output()
with output1:
    print('in 1')
    with output2:
        print('in 2')
    print('also in 1')

Voila would not keep a stack of output hooks, but only the last one. This caused it to fail after the output1 context was left.

The solution is to keep a stack of output hooks, tests are included.

voila/execute.py Outdated Show resolved Hide resolved
@jtpio
Copy link
Member

jtpio commented Aug 22, 2019

Thanks @maartenbreddels.

Tested locally with the example above and the nested outputs are handled properly.

@maartenbreddels maartenbreddels merged commit 09b0463 into voila-dashboards:master Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

control output widget from interact
2 participants