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

Convert container contents to output lazily #393

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

jonatanklosko
Copy link
Member

For frames Kino.Output.to_livebook/2 returns an output with the current set of outputs. Currently containers (grid/tabs/frame) convert their contents to output eagerly, and so if the content representation changes, a future container render is not going to know about it. Example:

frame_inner = Kino.Frame.new()
grid = Kino.Layout.grid([frame_inner])

Kino.Frame.render(frame_inner, "content")
grid

This PR makes the conversion lazy, so that containers store their contents as is, and only call Kino.Output.to_livebook/2 on render.

@jonatanklosko jonatanklosko merged commit 87aafa2 into main Feb 2, 2024
1 check passed
@jonatanklosko jonatanklosko deleted the jk-lazy-to-livebook branch February 2, 2024 04:48
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.

1 participant