Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make post space width fill optional #429

Merged
merged 5 commits into from
Feb 13, 2024
Merged

Make post space width fill optional #429

merged 5 commits into from
Feb 13, 2024

Conversation

bzkrouse
Copy link
Collaborator

@bzkrouse bzkrouse commented Feb 8, 2024

element_block() updates:

  • Add option for filling the post-space to the full width of the cell
  • remove unused border option

This will effectively close #407 as it should cover most use cases

@bzkrouse bzkrouse requested a review from karima662 February 8, 2024 18:49
@codecov-commenter
Copy link

codecov-commenter commented Feb 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (44babf0) 94.88% compared to head (ad0c33e) 94.89%.

❗ Current head ad0c33e differs from pull request most recent head 8bb79fc. Consider uploading reports for the commit 8bb79fc to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #429   +/-   ##
=======================================
  Coverage   94.88%   94.89%           
=======================================
  Files          31       31           
  Lines        2994     2997    +3     
=======================================
+ Hits         2841     2844    +3     
  Misses        153      153           
Files Coverage Δ
R/apply_row_grp_plan.R 100.00% <100.00%> (ø)
R/frmt_utils.R 79.83% <ø> (ø)
R/tfrmt.R 94.78% <ø> (ø)
R/theme_element.R 47.05% <100.00%> (ø)

Copy link
Collaborator

@karima662 karima662 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested with an example containing multiple groups - works well 😊

my_tfrmt <- tfrmt(
  group = c(grp1, grp2),
  label = label,
  param = param, 
  value = value,
  column = column,
  # testing element_block's fill param here
  row_grp_plan = row_grp_plan(
    row_grp_structure(group_val = ".default", element_block(post_space ="--", fill = FALSE)),
    label_loc =element_row_grp_loc(location = "spanning")
  ),
  body_plan = body_plan(
    frmt_structure(group_val = ".default", label_val = ".default", frmt("xx"))
  )
)

print_mock_gt(my_tfrmt, .default = 1:2)%>%
  tab_style(
    style = cell_text(whitespace = "pre", align = "left"),
    locations = cells_stub()

@bzkrouse bzkrouse merged commit f2a7528 into main Feb 13, 2024
3 checks passed
@bzkrouse bzkrouse deleted the bug-width-postspace branch February 15, 2024 17:51
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

row_grp_plan post space x col_style_plan width conflict
3 participants