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

fix(widgets/table): improve computation of table column widths #514

merged 2 commits into from Aug 1, 2021


Copy link

@fdehau fdehau commented Aug 1, 2021


The sum of the columns widths returned by Table::get_column_widths can sometimes be greater than the available width. This is happening because we are not feeding enough constraints to the cassowary solver. At the same time we already have an abstraction over cassowary which is used everywhere else: Layout. Therefore, I've replaced the manual column widths computation by a call to Layout.

Fixes #470

Testing guidelines

A regression test provided in #508 was used to test the solution.


@fdehau fdehau mentioned this pull request Aug 1, 2021
3 tasks
@fdehau fdehau merged commit a68e38e into master Aug 1, 2021
4 checks passed
@fdehau fdehau deleted the florian.dehau/table-column-widths branch August 1, 2021 14:46
jli added a commit to jli/sparktop that referenced this pull request Aug 22, 2021
seems to have changed with tui 0.16.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

Table widget panics when table doesnt fit screen
1 participant