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

Idea: Use one-char ellipsis symbol in more places #738

Closed
wants to merge 1 commit into from
Closed

Idea: Use one-char ellipsis symbol in more places #738

wants to merge 1 commit into from

Conversation

dannysepler
Copy link

@dannysepler dannysepler commented Apr 5, 2020

In print_table() and print_html(), when the column width exceeds the max_column_width, the ellipsis symbol factors into that max_column size. The three letters of a normal ellipsis are kinda bulky, especially when we have small max sizes like here: wireservice/csvkit#941

There's a few things we can do!

  1. As the author suggests, make the ellipsis char a parameter. Might not be necessary to expose to the user. They'd probably just toggle it off?

  2. As the reviewer suggests, make the max_precision customizable. This might not fix the issue, since print_table will still chop off the more precise value to insert the ellipsis characters

  3. Give "use_ellipsis", or "truncate_decimals" as a passed-in parameter. When it's false, we don't use the ellipsis in decimals. (I'm guessing non-decimals would need the ellipsis all the time?). This requires a bit more work with decimal parsing, but is totally possible

  4. (This diff) Use the one-char ellipsis in print_table and print_html. This is the simplest way to fix the readability in the issue above, so I chose it. It's also already used in "utils" so hooray for consistency?

@jpmckinney
Copy link
Member

I would merge this PR if you leave ellipsis_chars as-is (don't rename to ellipsis_char) and just change ... to .

@dannysepler
Copy link
Author

thanks! and no worries, i don't care about this that much anymore haha

@dannysepler dannysepler closed this Sep 7, 2021
jpmckinney added a commit that referenced this pull request Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants