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

Amplify Output button increases vertical size #2588

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

madlep
Copy link

@madlep madlep commented May 1, 2024

The existing "Amplify output" button increases horizontal size, but when returning a large data structure and/or sending a larger amount of data to stdout, the small vertical size is frustrating. Especially so on larger screen where there is more real estate to work with.

  • increase vertical size too when "Amplify output" is clicked.
  • regular size unchanged at 300px
  • "Amplified" size at 600px

This preserves existing logic by keeping the amplify setting client side only, and not relying on state managed via the liveview process. It could be done that way, but kept it consistent with current implementation.

amplify_output_vertically.mov

@CLAassistant
Copy link

CLAassistant commented May 1, 2024

CLA assistant check
All committers have signed the CLA.

@josevalim
Copy link
Contributor

This looks good to me but I wonder if we should go with a bit more conservative change, such as 450? Or maybe we should make the height configurable altogether, I don't know.

@madlep
Copy link
Author

madlep commented May 1, 2024

This looks good to me but I wonder if we should go with a bit more conservative change, such as 450? Or maybe we should make the height configurable altogether, I don't know.

@josevalim 450px still feels a bit small. At least when generating more output on a larger monitor where you want to optionally be able to use the screen real estate more effectively.

A few ideas:

  • "Amplify output" button becomes modal, rather than a toggle. ie, have 3 or more modes that alternate each time you click. Could start default narrow/short -> wide/short -> wide/tall -> back to narrow/short. Alternatively could have a number of stateful "radio" buttons for size rather than one that cycles through modes.
  • A cell setting UI option for "number of lines in output" or similar ("lines" is more user friendly than px size)
  • Some special annotations embedded in comments at the top of a code/markdown input cell controlling output height
  • Jupyter notebooks has a "Disable scrolling for outputs" right click menu option which maximises the height to match the actual output. I don't love this, as it is either too short by default, or really too tall for large output when disabled.

What are your thoughts?

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.

None yet

3 participants