Resize Cell Preview to full extents automatically.
Is your feature request related to a problem?
When you click on a cell, you get this awesome preview of the content whether it be an image or text. Unfortunately resizing the image has to happen manually, which if your images are small, or if your text is large, means your cell preview isn't much more useful than without the preview.
Describe the solution you'd like
When I select a cell, I expect the entire preview cell to be filled with the contents (automatically resized within the frame).
Describe alternatives you've considered
add a resize button?
Additional Context
No response
Would you like to implement a fix?
No
Text example
This might be a google colab thing
It's a google colab thing.
The way the .show preview works is by starting a local http server to serve the cell data. When you click on a cell, it makes a request for the full content. The rationale behind this client-server model is to prevent unnecessary rendering of large strings or images.
However, this doesn't work on colab as the server will be remote. The fallback right now is to just render the existing cell html in the preview popup.
If you'd like to play with it, the code for the table display is here https://github.com/Eventual-Inc/Daft/blob/main/src/daft-dashboard/src/lib.rs#L163
Update: We can leverage google.colab.output.serve_kernel_port_as_iframe(3238, cache_in_notebook=True) to do the tunnelling for us