Skip to content

Conversation

jprochazk
Copy link
Member

@jprochazk jprochazk commented Jul 8, 2025

width and height can now be set to auto.

  • for width, it sets the resulting Viewer's width to 100% of the notebook cell's width
  • for height, it matches width using a 16:9 aspect ratio.

This works the same way even if using numeric for one of width/height and auto for the other.

The default width/height is unchanged.

from rerun.notebook import Viewer

Viewer(width="auto", height="auto")

@jprochazk jprochazk added sdk-python Python logging API notebook Jupyter notebooks etc include in changelog labels Jul 8, 2025
Copy link
Member

@jleibs jleibs left a comment

Choose a reason for hiding this comment

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

This feels so much nicer!

@emilk
Copy link
Member

emilk commented Jul 9, 2025

Can we have a video please? Would be nice for the changelog!

@jleibs jleibs merged commit 3aff146 into main Jul 9, 2025
49 checks passed
@jleibs jleibs deleted the jan/notebook-auto-size branch July 9, 2025 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog notebook Jupyter notebooks etc sdk-python Python logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notebook widget should dynamically size to the width of the notebook
3 participants