Skip to content
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

Add support for printing tables with borders #855

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

p8
Copy link
Member

@p8 p8 commented Aug 9, 2023

Adding borders to tables can improve their legibility.

Before

  Name  Number  Color
  Erik       1  green
  Ruby       2  red 

After with borders: true

+------+--------+-------+
| Name | Number | Color |
+------+--------+-------+
| Erik |      1 | green |
| Ruby |      2 | red   |
+------+--------+-------+

This would allow replacing the custom table for code statistics in
Rails, with the generic implementation in Thor.

By adding :separators to a table a horizontal separator will be added.
This functionality was inspired by: https://github.com/piotrmurach/tty-table
Having the ability to add separators where required adds more flexibility instead of having headers and footers.

Builds on: #854

@p8 p8 force-pushed the features/print-table-with-borders branch 2 times, most recently from 5839dad to f8d24ca Compare August 9, 2023 12:07
@p8 p8 force-pushed the features/print-table-with-borders branch 2 times, most recently from 8890ecf to 74ca5b9 Compare August 22, 2023 07:44
Adding borders to tables can improve their legibility.

This would allow replacing the custom table for code statistics in
Rails, with the generic implementation in Thor.

By adding :separators to a table a horizontal separator will be added.
This functionality was inspired by: https://github.com/piotrmurach/tty-table
@p8 p8 force-pushed the features/print-table-with-borders branch from 74ca5b9 to aab2c57 Compare August 22, 2023 15:34
@rafaelfranca rafaelfranca merged commit a4d99cf into rails:main Aug 23, 2023
7 checks passed
@p8 p8 deleted the features/print-table-with-borders branch August 23, 2023 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants