Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(console): stop truncating task fields column (console-rs#82)
Currently, there's a bug where the console's task list view truncates the fields column to the first ten characters, even when there are characters remaining in the window to display more of the fields column. This is due to `tui`'s layout constraints system apparently choosing to give that column only the minimum number of characters specified, instead of giving it all the remaining characters not used by other columns. I couldn't figure out how to get `tui` to actually do what we want (there doesn't seem to be a `Constrait` for saying "use any remaining characters not needed for satisfying previous layout constraints"), so I just kind of hacked around it by adding up all the other columns, subtracting their widths from the total width of the window, and specifying that as a "minimum" constraint. This is kinda ugly, but it seems to work. ### Before: ![image](https://user-images.githubusercontent.com/2796466/128217907-81ec6ed0-2282-4c7a-98b2-6773dd4888f5.png) ### After: ![image](https://user-images.githubusercontent.com/2796466/128218221-71c7ec6c-303f-448c-8374-eef0785ab1c3.png) Signed-off-by: Eliza Weisman <eliza@buoyant.io>
- Loading branch information