tdwright / contabs

Simple yet flexible tables for console apps.
MIT License
54 stars 20 forks source link

Specify overflow behaviour for long strings #26

Closed tdwright closed 6 years ago

tdwright commented 6 years ago

Expanding on #5, there may be a range of things we want to happen when our data contains a long string:

  1. Show it all on one line, making the column very wide. This is the current behaviour, but seems suboptimal.
  2. We may want to wrap the text as suggested in #5, so that we can control the width at the expense of the height of the row.
  3. Another option would be to specify a length at which the strings in a column should be truncated.

I suggest we add an enum field to the column type so that these behaviours can be selected. We would also need a width column for options 2 and 3, so that we would know when to wrap/truncate the string.

Question: What's a sensible default behaviour?

tdwright commented 6 years ago

Fixed in #27