Handle small terminal sizes with lots of resources to display
See original GitHub issueDue to the nature of the text rendering, using the cdktf
cli for stacks with lots of resources in small terminal windows leads to lots of scrollback and flickering, broken text output.
Essentially, we’ll have to adjust the output size dynamically to the terminal size.
A few ideas:
- Define a fixed size for our canvas based on the terminal dimensions, and make sure elements exceeding the size won’t be rendered. This would need us to implement some kind of scrolling mechanism
- Generally reduce dynamic elements shown on the screen, and use static text where possible
- Calculate canvas size and cut off overflowing elements
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Looking for X terminal with correct window resize handling
and it gracefully handles detaching from a terminal that's one size (80x24, say) and re-attaching from a terminal of another size (say, 132x50)....
Read more >Screen sizes and breakpoints - Windows apps - Microsoft Learn
This table describes the different size classes and breakpoints. Responsive design breakpoints. Size class, Breakpoints, Typical screen size ...
Read more >Screen User's Manual - GNU.org
1 Overview. Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells.
Read more >App resources overview - Android Developers
Resources are the additional files and static content that your code uses, such as bitmaps, layout definitions, user interface strings, ...
Read more >charmbracelet/bubbletea: A powerful little TUI framework
The fun, functional and stateful way to build terminal apps. A Go framework based on The Elm Architecture. Bubble Tea is well-suited for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This could look like this and use static elements
I think this would solve the scrollback issue in almost all cases (given that Terraform CLI does 10 operations in parallel by default) and would likely have a very positive impact on the high cpu usage of the CLI as well.
I’m going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you’ve found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.