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

fixes clear cell outputs command and improves toolbar creation #13640

Merged
merged 5 commits into from
Apr 25, 2024

Conversation

jonah-iden
Copy link
Contributor

What it does

This fixes the clear cell output and change presentation from the cell sidebar context menu

How to test

Open or create a notebook including a cell with multiple output representations.
For example the following (requires PIL installed in the kernel)

 from PIL import Image

img_1 = Image.new("RGBA", (1600, 200), color="red")

display(img_1)

Check that changing the ouptut presentation works.
Check that clearing the output works.

Follow-ups

There is currently no support for multiple outputs yet. So if you have two outputs both are affected by the actions.
Also it seems there is still a bug with going back to images after changing to text

Review checklist

Reminder for reviewers

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
@jonah-iden jonah-iden requested a review from msujew April 25, 2024 10:18
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works partially: When initially rendering the output, changing the presentation doesn't work on the first attempt. Only after clearing the output and then rerunning the cell does it work as expected. Also, changing from image to text and then back to image simply removes (?) the output. Only after running the cell again, I get to see the image output. See the attached video:

2024-04-25.15-08-05.mp4

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
@jonah-iden
Copy link
Contributor Author

jonah-iden commented Apr 25, 2024

@msujew the sometimes not being able to change the presentation should be fixed, as described in the follow ups the problem with going back to image seems to be a larger one. I would work on that on a separate PR

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, in this case, this looks good to me 👍

@jonah-iden jonah-iden merged commit c5c6a39 into master Apr 25, 2024
10 of 14 checks passed
@jonah-iden jonah-iden deleted the jiden/notebook-fix-cell-toolbar-commands branch April 25, 2024 14:49
@github-actions github-actions bot added this to the 1.49.0 milestone Apr 25, 2024
@msujew msujew added the notebook issues related to notebooks label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notebook issues related to notebooks
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants