Skip to content

Limit terminal width to parent container size#77

Open
oliverroick wants to merge 2 commits into
mainfrom
limit-terminal-size
Open

Limit terminal width to parent container size#77
oliverroick wants to merge 2 commits into
mainfrom
limit-terminal-size

Conversation

@oliverroick

Copy link
Copy Markdown
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
Copy Markdown
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.

@batpad

batpad commented Mar 26, 2025

Copy link
Copy Markdown
Collaborator

Oops this PR has been open a while. @oliverroick do we still need to get this over the line to fix #67 ?

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

3 participants