Skip to content

Append unnamed addl_cmds theme elements to the end of the calls - #2493

Merged
ddsjoberg merged 1 commit into
mainfrom
issue-1446-addl-cmds
Oct 21, 2026
Merged

ddsjoberg merged 1 commit into
mainfrom
issue-1446-addl-cmds

Conversation

@ddsjoberg

Copy link
Copy Markdown
Owner

What changes are proposed in this pull request?

  • The 'as_gt-lst:addl_cmds', 'as_flex_table-lst:addl_cmds', 'as_hux_table.gtsummary-lst:addl_cmds', and 'as_kable_extra-lst:addl_cmds' theme elements now accept unnamed list elements, which are appended to the end of the calls. Previously, each element had to be named after the call it should follow. (Feature request: Simpler specification of additional cmds in themes #1446)

Implementation: the shared add_expr_after() helper now appends when the element has no name. Names that don't match an existing call still error. Theme element descriptions in data-raw/gtsummary_theme_elements.csv are updated and R/sysdata.rda regenerated.

If there is an GitHub issue associated with this pull request, please provide link.
closes #1446


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

  • If a bug was fixed, a unit test was added.
  • Code coverage is suitable for any new functions/features: devtools::test_coverage()
  • spelling::spell_check_package() runs with no spelling errors in documentation
  • All GitHub Action workflows pass with a ✅
  • Update NEWS.md with the changes from this pull request under the heading "# gtsummary (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).

When the branch is ready to be merged into main:

  • Approve Pull Request
  • Merge the PR. Please use "Squash and merge".

🤖 Generated with Claude Code

)

Unnamed elements in the `as_gt-lst:addl_cmds`, `as_flex_table-lst:addl_cmds`,
`as_hux_table.gtsummary-lst:addl_cmds`, and `as_kable_extra-lst:addl_cmds`
theme elements are now appended to the end of the converter calls, so users
no longer need to name the call to insert after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ddsjoberg
ddsjoberg merged commit 61ec168 into main Oct 21, 2026
11 checks passed
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: Simpler specification of additional cmds in themes

1 participant