Skip to content

Add font_size to annotate_lineplot_df() - #296

Open
Melkiades wants to merge 4 commits into
mainfrom
295_annotate_font_size@main
Open

Add font_size to annotate_lineplot_df()#296
Melkiades wants to merge 4 commits into
mainfrom
295_annotate_font_size@main

Conversation

@Melkiades

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

annotate_lineplot_df() had no way to set the summary table font size, so it was fixed at the df2gg_aligned() defaults. font_size maps to text_size/label_size, matching annotate_riskdf(). annotate_pkc_df() already declared text_size but never forwarded it.

Reference GitHub issue associated with pull request. closes #295


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

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Unit Tests Summary

  1 files  270 suites   3m 1s ⏱️
270 tests 270 ✅ 0 💤 0 ❌
788 runs  788 ✅ 0 💤 0 ❌

Results for commit 8c60457.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Unit Test Performance Difference

Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
annotate_gg 👶 $+0.00$ annotate_lineplot_df_forwards_font_size_to_df2gg_aligned
annotate_gg 💔 $2.14$ $+1.49$ annotate_lineplot_df_warns_if_plot_is_not_generated_by_gg_lineplot
annotate_gg_pkc 👶 $+0.00$ annotate_pkc_df_forwards_font_size_to_df2gg_aligned
annotate_gg_pkc 👶 $+0.00$ annotate_pkc_df_soft_deprecates_text_size_but_keeps_behaviour
tbl_hierarchical_rate_and_count 💔 $20.73$ $+1.29$ tbl_hierarchical_rate_and_count_works
tbl_hierarchical_rate_by_grade 💔 $4.53$ $+1.73$ tbl_hierarchical_rate_by_grade_works
tbl_shift 💔 $4.14$ $+1.54$ tbl_shift_strata_location_
tbl_survfit_quantiles 💚 $2.01$ $-1.71$ tbl_survfit_quantiles_works
tbl_survfit_times 💔 $1.08$ $+1.87$ tbl_survfit_times_works
tbl_with_pools 💚 $11.54$ $-1.59$ tbl_with_pools_validates_inputs_correctly

Results for commit 3a01c47

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

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_forest_utils.R                        97      10  89.69%   76-79, 94-100
R/add_forest.R                             139       0  100.00%
R/add_hierarchical_count_row.R              33       0  100.00%
R/adjust_stat_columns_wrap.R                29       1  96.55%   59
R/annotate_gg_km.R                         141       0  100.00%
R/annotate_gg_pkc.R                        100       0  100.00%
R/annotate_gg.R                             83       0  100.00%
R/ard_tabulate_abnormal_by_baseline.R       65       0  100.00%
R/crane-package.R                            2       2  0.00%    26-27
R/deprecated.R                              21      21  0.00%    18-54
R/df_add_poolings.R                         41       0  100.00%
R/get_cox_pairwise_df.R                    163       0  100.00%
R/gg_km_utils.R                             39      14  64.10%   20-37
R/gg_km.R                                  143      37  74.13%   55-58, 75, 102, 176-181, 184-187, 197-199, 204-205, 239-241, 248-251, 255, 266-270, 283, 285-287
R/gg_lineplot.R                             94       0  100.00%
R/gg_mmrm_lineplot.R                       102       1  99.02%   106
R/gg_pkc_lineplot.R                         98       0  100.00%
R/gg_utils.R                               222       0  100.00%
R/h_pkparam_sort.R                         427     427  0.00%    12-468
R/label_roche.R                             72       0  100.00%
R/modify_header_rm_md.R                     18       2  88.89%   35-36
R/modify_split_caption.R                    26       0  100.00%
R/modify_zero_recode.R                      20       1  95.00%   64
R/pk_helper.R                               37      37  0.00%    14-146
R/reverse_difference_ci.R                   33       0  100.00%
R/tbl_baseline_chg.R                       188       0  100.00%
R/tbl_coxph.R                               90       1  98.89%   229
R/tbl_hierarchical_incidence_rate.R        291       4  98.63%   430-433
R/tbl_hierarchical_rate_and_count.R        339      13  96.17%   343, 425, 446-456
R/tbl_hierarchical_rate_by_grade.R         317       3  99.05%   169-171
R/tbl_listing.R                             35       0  100.00%
R/tbl_mmrm.R                               254       1  99.61%   393
R/tbl_null_report.R                          9       0  100.00%
R/tbl_rmpt.R                               157      12  92.36%   299-304, 316-321
R/tbl_roche_subgroups.R                    155       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                  154       0  100.00%
R/tbl_survfit_times.R                       92       0  100.00%
R/tbl_with_pools.R                          64       0  100.00%
R/theme_gtsummary_roche.R                   87       1  98.85%   61
R/utils.R                                   42       0  100.00%
TOTAL                                     4863     588  87.91%

Diff against main

Filename               Stmts    Miss  Cover
-------------------  -------  ------  --------
R/annotate_gg_pkc.R       +8       0  +100.00%
R/annotate_gg.R           +2       0  +100.00%
TOTAL                    +10       0  +0.02%

Results for commit: 8c60457

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

… text_size

annotate_lineplot_df() had no way to set the summary table font size, so it
was fixed at the df2gg_aligned() defaults. Add a font_size argument mapping to
text_size and label_size, matching annotate_riskdf().

annotate_pkc_df() declared text_size but never forwarded it; wire it through.
@Melkiades
Melkiades force-pushed the 295_annotate_font_size@main branch from 1f90834 to f63b391 Compare August 10, 2026 09:09
annotate_pkc_df() gains a font_size argument (points, default 10) so the whole
annotate family shares one knob. The old text_size argument (geom units) is
soft-deprecated via lifecycle and still honoured: it is converted to font_size
so existing behaviour is preserved exactly.
The package declares Language: en-US; use 'favor' instead of 'favour'.
Comment thread R/annotate_gg_pkc.R

@mhallal1 mhallal1 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

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.

Control annotation table font size in annotate_lineplot_df()

2 participants