ascii-table icon indicating copy to clipboard operation
ascii-table copied to clipboard

Remove the concept of heading in favour of a break

Open gajus opened this issue 9 years ago • 2 comments

There is no need of having the entire concept of heading.

setHeading(heading, [...])
setHeadingAlign(direction)
setHeadingAlignLeft()
setHeadingAlignCenter()

CLI is non-interactive, therefore differentiating between a header and a regular row does not have value, i.e. user can set headings using a regular row at the beginning of the table.

Instead, I propose that a new method addBreak is added, that would generate that line that separates the main content from the header.

gajus avatar Sep 10 '15 21:09 gajus

@gajus Agreed, I like this idea quite a bit.

sorensen avatar Sep 10 '15 21:09 sorensen

The break method will be added, but the concept of a heading will remain. There are other users of this library that are in favor of the automatic column-spanning of a table heading.

This may be abstracted in the future to something more generic, but until then the heading remains.

Those methods listed will eventually be removed, in favor of a single configuration method.

sorensen avatar Apr 11 '16 20:04 sorensen