Replies: 1 comment 1 reply
-
|
In general, I can get down with this: it’s very hard to make one algorithm work for all cases. |
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
The current Lipgloss table component uses the median of non-whitespace text of each column, and shrink/resize column based on the largest median.
In some scenarios, with a large enough tableterminal when columns have very small non-whitespace content, this creates huge horizontal gaps between columns.
While this current mode might be suitable for a lot of applications, I find myself a bit limited by this "opinionated" sizing algorithm.
I believe that a compact mode, where each column could be declared with a max width, would allow finer control for table content that is known in advance (i.e a column containing numbers with few digits). I also think that when the column's contents are not enough to fill the whole table width, it might be better when the row cells/columns are left-stacked, instead of being spread horizontally to the full available width.
Note that I'm using the Lipgloss table package for a custom Bubbletea table component. As such, in my application, the table is framed and take up the whole width of the terminal.
Below is a screenshot of an app I'm working on that demonstrate the current behavior:
Beta Was this translation helpful? Give feedback.
All reactions