fix(console): stop truncating task fields column #82
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 togive 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 remainingcharacters 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:
After:
Signed-off-by: Eliza Weisman eliza@buoyant.io