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

feat: Bump min_title_chars back up #620

Merged
merged 2 commits into from
Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

- Fix printing of very small numbers (#615, #619).

- The default for `pillar.min_title_chars` has been bumped up to 20 characters
so that title truncuation only affects very long variables (#582).

## Chore

- Use constructors in `vec_cast()` (#587).
Expand Down
4 changes: 2 additions & 2 deletions R/options.R
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ pillar_options <- list2(
sigfig
}),
#' - `pillar.min_title_chars`: The minimum number of characters for the column
#' title, default: `5`. Column titles may be truncated up to that width to
#' title, default: `20`. Column titles may be truncated up to that width to
#' save horizontal space. Set to `Inf` to turn off truncation of column
#' titles.
min_title_chars = make_option_impl(
getOption("pillar.min_title_chars", default = 5L)
getOption("pillar.min_title_chars", default = 20L)
),
#' - `pillar.min_chars`: The minimum number of characters wide to
#' display character columns, default: `3`. Character columns may be
Expand Down
2 changes: 1 addition & 1 deletion man/pillar_options.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions tests/testthat/_snaps/ansi/ctl_colonnade.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,14 @@
ctl_colonnade(list(a_very_long_column_name = 0), width = 20)
Output
$body
a_very_long_colu~1
<dbl>
1 0

$extra_cols
list()
$extra_cols$a_very_long_column_name
[1] 0


$abbrev_cols
[1] "a_very_long_column_name"
character(0)

$abbrev_col_idxs
numeric(0)
Expand Down
25 changes: 5 additions & 20 deletions tests/testthat/_snaps/ctl_new_pillar.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,11 @@
Code
ctl_new_pillar_list(new_tbl(), as.matrix(trees[1:3, ]), width = 8, title = "a")
Output
[[1]]
<pillar>
a[,"Girth"]
<dbl>
8.3
8.6
8.8

list()
attr(,"extra")
[1] 2 3
[1] 1 2 3
attr(,"remaining_width")
[1] 0
[1] 8
attr(,"simple")
[1] FALSE
Code
Expand All @@ -97,18 +90,10 @@
8.6
8.8

[[2]]
<pillar>
[,"Height"]
<dbl>
70
65
63

attr(,"extra")
[1] 3
[1] 2 3
attr(,"remaining_width")
[1] 4
[1] 8
attr(,"simple")
[1] FALSE
Code
Expand Down
Loading