-
Notifications
You must be signed in to change notification settings - Fork 501
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
Hide empty cells using CSS #391
Hide empty cells using CSS #391
Conversation
a75db57
to
3b382c7
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.
Totally agree with this. I think we stripping cells without output in the code was more like a temporary solution, this is what we had to do from the beginning.
Are there not some cases where a cell can initially have no outputs, but some later code (asynchronously) adds an output to the cell? This would not normally be an issue with nbconvert, but if we are doing progressive rendering, this might be an issue. Is it possible to use the |
Good point, I agree using |
|
I've got an alternate solution, I'm going to open another PR |
Alternate solution: #405 |
Do you already have a specific use case in mind? I'm trying to figure out a scenario where this could happen. |
display supports a display_id, so that you can change outputs of previous cells. e.g.: We don't support that actually with voila progressive rendering. I wonder if we should explicitly not support that, or if we should fix this somehow. Note that if you output an empty Output widget, it will always work (since the cell contains output in the form of a widget) |
I also thought about this, but for having a |
Yes, my question basically boils down to: If you do a a |
I actually tried and it seems you can not use |
This seems to work: The interesting thing is that if I try this: > handle = display(display_id=True)
> handle.update('world') It doesn't actually work in neither classic notebook nor lab. No errors are raised, but the update isn't actually displayed. So I don't think it is a very common pattern (but strictly speaking, I would have expected that it should work). |
Interesting. I agree it should work. |
(note, that I'm happy with the code in this PR as-is, since neither classic nor lab supports it, just making a note for the future about it) |
I do agree. I think I prefer the alternate solution though #405. It's basically the same behavior, only that instead of hiding empty cells we simply don't send them. |
97d8919
to
28e0252
Compare
@maartenbreddels would you like to have another look at this one? |
I am fine with this solution. |
@maartenbreddels I had a small comment on this one that martin is fixing now. I think this should get in before the release. |
I think so too, failure is unrelated. I'll wait a bit more before making a release, in case we need to merge more. |
28e0252
to
401511a
Compare
Done |
Should fix #387