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

Limit terminal width to parent container size #77

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

oliverroick
Copy link
Collaborator

Fixes #67

By setting the min-size of the grid cell to 0, we prevent the children from growing beyond its size.

This resolves the issue described but has size effects:

  • If there are breaks in a line there's a tiny scroll bar
Screenshot 2024-11-12 at 16 18 13
  • If there are breaks in a line, subsequent output might overwrites existing output.
Screenshot 2024-11-12 at 16 18 59

I couldn't find any xterm settings to change the behaviour so I'm not sure what the best approach is.

@yuvipanda
Copy link
Member

@oliverroick I've had to basically use https://xtermjs.org/docs/api/addons/fit/ in the past to deal with any sizing issues with xterm in the past. For example, in https://github.com/jupyterhub/binderhub/blob/a93a01cf620605f20d5874a02ffbf9afd9ef97b9/binderhub/static/js/index.js#L74 (don't judge the rest of the code), we call fit everytime something is written to the terminal, to deal with the second side effect I think.

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.

Build your own image form breaks in smaller screens
2 participants