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

Keep focus columns in place #465

Merged
merged 10 commits into from
Jan 29, 2022
Merged

Keep focus columns in place #465

merged 10 commits into from
Jan 29, 2022

Conversation

krlmlr
Copy link
Member

@krlmlr krlmlr commented Jan 28, 2022

to avoid confusion. Needs cleanup.

library(tibble)
x <- tibble(a = tibble(x = 1, y = 2), b = "long enough")

x
#> # A tibble: 1 × 2
#>     a$x    $y b          
#>   <dbl> <dbl> <chr>      
#> 1     1     2 long enough
pillar::tbl_format_setup(x, width = 30, focus = "b")
#> <pillar_tbl_format_setup>
#> <tbl_format_header(setup)>
#> # A tibble: 1 × 2
#> <tbl_format_body(setup)>
#>     a$x    $y b          
#>   <dbl> <dbl> <chr>      
#> 1     1     2 long enough
#> <tbl_format_footer(setup)>
pillar::tbl_format_setup(x, width = 15, focus = "b")
#> <pillar_tbl_format_setup>
#> <tbl_format_header(setup)>
#> # A tibble: 1
#> #   × 2
#> <tbl_format_body(setup)>
#>     a$x b      
#>   <dbl> <chr>  
#> 1     1 long e…
#> <tbl_format_footer(setup)>
#> # … with 1
#> #   more
#> #   variable:
#> #   a$y <dbl>
pillar::tbl_format_setup(x, width = 10, focus = "b")
#> <pillar_tbl_format_setup>
#> <tbl_format_header(setup)>
#> # A
#> #   tibble:
#> #   1 × 2
#> <tbl_format_body(setup)>
#>   b       
#>   <chr>   
#> 1 long en…
#> <tbl_format_footer(setup)>
#> # … with
#> #   1
#> #   more
#> #   variable:
#> #   a <tibble[,2]>

Created on 2022-01-28 by the reprex package (v2.0.1)

Underlines not shown in reprex, full output: https://rpubs.com/krlmlr/pillar-focus.

@krlmlr krlmlr force-pushed the f-focus-in-place-2 branch from 73c1947 to c201742 Compare January 29, 2022 05:55
@krlmlr krlmlr merged commit 2eeb104 into main Jan 29, 2022
@krlmlr krlmlr deleted the f-focus-in-place-2 branch January 29, 2022 07:20
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant