Skip to content

Conversation

@BFalquet
Copy link

@BFalquet BFalquet commented Jan 9, 2026

What changes are proposed in this pull request?

Updates the theme_gtsummary_roche function to set the default flextable layout property to "fixed" instead of "autofit".

Reference GitHub issue associated with pull request. e.g., 'closes #'
closes #150

Pre-review Checklist (if item does not apply, mark is as complete)

  • All GitHub Action workflows pass with a ✅
  • PR branch has pulled the most recent updates from master branch: usethis::pr_merge_main()
  • If a bug was fixed, a unit test was added.
  • Code coverage is suitable for any new functions/features (generally, 100% coverage for new code): devtools::test_coverage()
  • Request a reviewer

Reviewer Checklist (if item does not apply, mark is as complete)

  • If a bug was fixed, a unit test was added.
  • Run pkgdown::build_site(). Check the R console for errors, and review the rendered website.
  • Code coverage is suitable for any new functions/features: devtools::test_coverage()

When the branch is ready to be merged:

  • Update NEWS.md with the changes from this pull request under the heading "# cards (development version)". If there is an issue associated with the pull request, reference it in parentheses at the end update (see NEWS.md for examples).
  • All GitHub Action workflows pass with a ✅
  • Approve Pull Request
  • Merge the PR. Please use "Squash and merge" or "Rebase and merge".

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026


🎉 Thank you for your contribution! Before this PR can be accepted, we require that you read and agree to our Contributor License Agreement.
You can digitally sign the CLA by posting a comment on this Pull Request in the format shown below. This agreement will apply to this PR as well as all future contributions on this repository.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@BFalquet
Copy link
Author

BFalquet commented Jan 9, 2026

I have read the CLA Document and I hereby sign the CLA

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

badge

Code Coverage Summary

Filename                               Stmts    Miss  Cover    Missing
-----------------------------------  -------  ------  -------  ------------------------------------------------------------------------------------------------
R/add_blank_rows.R                        63       0  100.00%
R/add_difference_row.R                   101       0  100.00%
R/add_hierarchical_count_row.R            33       0  100.00%
R/annotate_gg_km.R                       137       9  93.43%   86-89, 108-112
R/as_ggplot.R                             13       1  92.31%   18
R/crane-package.R                          2       2  0.00%    28-29
R/deprecated.R                             6       6  0.00%    15-21
R/forest.R                                68       0  100.00%
R/get_cox_pairwise_df.R                   50      13  74.00%   68-71, 74-77, 82, 92-95
R/gg_km_utils.R                          102      16  84.31%   94, 134-151, 167
R/gg_km.R                                143      37  74.13%   54-57, 74, 101, 175-180, 183-186, 196-198, 203-204, 238-240, 247-250, 254, 265-269, 282, 284-286
R/label_roche.R                           72       0  100.00%
R/modify_header_rm_md.R                   18       2  88.89%   35-36
R/modify_zero_recode.R                    13       0  100.00%
R/tbl_baseline_chg.R                     186       0  100.00%
R/tbl_hierarchical_rate_and_count.R      148       0  100.00%
R/tbl_hierarchical_rate_by_grade.R       271       3  98.89%   162-164
R/tbl_listing.R                           35       0  100.00%
R/tbl_null_report.R                        9       0  100.00%
R/tbl_roche_subgroups.R                  119       0  100.00%
R/tbl_roche_summary.R                     64       0  100.00%
R/tbl_shift.R                            116       0  100.00%
R/tbl_survfit_quantiles.R                132       1  99.24%   295
R/tbl_survfit_times.R                     92       0  100.00%
R/theme_gtsummary_roche.R                 74       0  100.00%
R/utils.R                                 36       0  100.00%
TOTAL                                   2103      90  95.72%

Diff against main

Filename      Stmts    Miss  Cover
----------  -------  ------  --------
TOTAL             0       0  +100.00%

Results for commit: 8f3d642

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Unit Tests Summary

  1 files   73 suites   1m 49s ⏱️
 73 tests  73 ✅ 0 💤 0 ❌
200 runs  200 ✅ 0 💤 0 ❌

Results for commit 8f3d642.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
forestplot 💚 $19.90$ $-1.57$ $0$ $0$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
forestplot 💚 $19.90$ $-1.57$ test_g_forest_works
tbl_baseline_chg 💔 $14.35$ $+2.32$ tbl_baseline_chg_works
tbl_hierarchical_rate_and_count 💚 $4.73$ $-1.78$ tbl_hierarchical_rate_and_count_works

Results for commit bb779b7

♻️ This comment has been updated with latest results.

@Melkiades
Copy link
Contributor

@BFalquet I think it is fine, but I want to understand a bit better the final look and expected work from the user. Could you add a comment/documentation where you change the layout? similarly to what you showed in the issue

Copy link
Contributor

@Melkiades Melkiades left a comment

Choose a reason for hiding this comment

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

Blocking this for now, due to further discussion. I do not think "fixed" would work as all tables would have too large or too small widths that do not fit the margin. Attempting to estimate the user's expected width would be often incorrect/unprecise. Also, "autofit" aims at fitting the margins automatically, which is a feature much easier and common to achieve

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.

[Feature Request]: fixed layout for flextable

3 participants