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

Added auto-resizing support. Tables now fully responsive. #59

Closed
wants to merge 6 commits into from
Closed

Added auto-resizing support. Tables now fully responsive. #59

wants to merge 6 commits into from

Conversation

tecfu
Copy link

@tecfu tecfu commented Mar 19, 2015

Column widths now automatically resize when the optioned or calculated width of the columns exceed the width of the terminal viewport.

This fixes a bug that existed whereby the borders would not render correctly when they did not fit within the terminal viewport.

This was done by checking the total width of needed by the columns and determining if that width exceeded the width of the terminal viewport. When so, the column widths are resized to equal divisions of the table so that they do not overlap the terminal viewport bounding box.

Also, full text wrapping is implemented rather than the current '...', truncated line solution. This was done using the js-beautify package.

@tecfu
Copy link
Author

tecfu commented Mar 19, 2015

Also, this fails the unit tests because, of course, you hardcoded in the expected output strings and they don't match the responsive sizing.

However, I ran through your unit tests, manually checked each for errors and didn't see any problems.

@tecfu tecfu changed the title Added auto-resizing support. Added auto-resizing support. Tables now fully responsive. Mar 19, 2015
@tecfu tecfu mentioned this pull request Mar 19, 2015
@tecfu tecfu closed this Mar 24, 2015
@stevenvachon
Copy link
Contributor

Why'd you close this?

@gabrielcsapo
Copy link

@tecfu yeah can you add this back 🙏

@tecfu
Copy link
Author

tecfu commented Aug 1, 2017

@gabrielcsapo These guys (Automattic) don't maintain the package. So I ended up building a new table package from scratch (tty-table) and I also made it support the Automattic/cli-table API. So there's no reason to use this package any more, other than the fact that its older and has more stars.

@gabrielcsapo
Copy link

@tecfu i will check it out! Thank you!

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.

None yet

3 participants