Skip to content

cell span (colspan, table title) support #12

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

Closed
ORESoftware opened this issue Apr 10, 2016 · 6 comments
Closed

cell span (colspan, table title) support #12

ORESoftware opened this issue Apr 10, 2016 · 6 comments

Comments

@ORESoftware
Copy link

Just looking for this simple feature in gajus/table

screenshot 2016-04-09 18 03 19

Looking for somewhere in this library's output to put "Suman Test Results"

Does this lib support a table title?

@gajus gajus changed the title table title cell span (colspan, table title) support Apr 10, 2016
@gajus
Copy link
Owner

gajus commented Apr 10, 2016

No, there is no way no way make a certain cell span multiple columns. As far as I remember, this feature is not implemented on purpose: It would add a considerable complexity to otherwise simple codebase.

@gajus
Copy link
Owner

gajus commented Apr 10, 2016

There is nothing that would stop you from using the low-level API (see ./tests) to achieve the same result. Regardless, I would discourage such use as an unnecessary.

@gajus
Copy link
Owner

gajus commented Apr 10, 2016

You can write a PR. I will consider to merge it. If the added complexity is within reason, I will merge it. Otherwise, I can support maintenance of a branch/ separate module that relies on the codebase or table and supports column spanning.

@ORESoftware
Copy link
Author

Alrighty let me think about it!

@thom4parisot
Copy link

thom4parisot commented Oct 10, 2016

I guess it would have to imply some sampling if no column width defaults are provided.

table([
  ["Test Results"],
  ["Metric", "Value", "Notes"],
  ["Suite name", "@Test1", ""],
  // ...
]);

The main difficulty is to understand which columns are merged into which ones. Without hint provided by the user it is difficult to know :-(

Unless by providing symbols?

table([
  ["Test Results", ...table.merge.right(2)],
  ["Metric", "Value", "Notes"],
  ["Suite name", "@Test1", ""],
  // ...
]);

// -->

table([
  ["Test Results", @@TableMergeRight, @@TableMergeRight],
  ["Metric", "Value", "Notes"],
  ["Suite name", "@Test1", ""],
  // ...
]);

@nam-hle
Copy link
Collaborator

nam-hle commented Jan 5, 2022

The feature has been included in v6.8.0

@nam-hle nam-hle closed this as completed Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants