How to create a card view with Panels of un-equal widths? #2701
Unanswered
dzmitry-kankalovich
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Context: I am modifying
starcli
terminal utility to display a bit more data in Grid view, and I'd like to use as much as possible of the screen real estate.Problem: I cannot figure out how do I create a view such that all the Panels (with un-equal widths between each other) float left taking up all available horizontal space per row of panels.
Example of what I want:
.
The closest I get is this:

I tried:
rich.columns.Columns
- this one is the closest to the solution, but it's column-based, so there are still gaps between sibling panels, which otherwise could've been used to render more panels.rich.console.Group
-Group
seem to render every element in its own row, now way around to justify panels horizontally.Console
parameters to replace\n
in theend=
param, adding soft-wraps and etc seem to have no desired effect, the panels are rendered vertically one after another.Reference code snippet with
Columns
approach:I've tried to create columns per row, but I am unable to calculate the factual width before rendering:
Beta Was this translation helpful? Give feedback.
All reactions