4 Commits
Author SHA1 Message Date
jaredandClaude Sonnet 5.5 119aa7aa0f feat(theme): add a showtext switch to civilytics_load_fonts() for ragg users (#29)
R-CMD-check / R CMD check (push) Successful in 5m7s
civilytics_load_fonts(showtext = getOption("civilytics.showtext", TRUE))
registers the brand fonts and only then turns on showtext, so ragg users can
opt out of its 96 dpi text sizing. The default is unchanged, so existing
reports render as before. The help page documents the ragg path.

Closes #29

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 15:45:47 -04:00
jaredandClaude Sonnet 5.5 f3ec052144 fix(logo): reserve a logo band in add_logo_ga() instead of a negative margin (#28)
R-CMD-check / R CMD check (push) Successful in 4m38s
add_logo_ga() now gives the logo its own band (logo_height inches) below the
plots, as add_logo() does, and leaves plot margins alone unless margin_param
is given.

Closes #28

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 15:39:43 -04:00
jaredandClaude Sonnet 5.5 dfcad3d0b8 chore(packaging): bump version to 0.3.2 and record fixes in NEWS
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 15:27:55 -04:00
jared 2c7c9a6dbc Fix ggplot2 imports and polish utility functions for publication
R-CMD-check / R CMD check (push) Successful in 4m17s
Blocking issue #1: Replace all ggplot2::function() calls with bare
references in R/colors.R, R/logo.R, R/theme.R. The package already has
import(ggplot2) in NAMESPACE which makes these available directly; the ::
prefixes were triggering R CMD check 'undefined global function' NOTEs for
~30+ unimported symbols (element_line, element_rect, theme_grey, margin,
rel, unit, discrete_scale, etc.).

Suggestion #6: Replace class(x) == "character" with "character" %in% class(x)
in R/db.R (countCleanr and simpleCap). The == pattern breaks on S3 objects
with multiple class attributes.

Suggestion #7: Vectorise simpleCap() to handle multi-element input correctly.
Previously strsplit(x, ' ')[[1]] only processed the first element; now uses
unname(vapply()) to capitalise each vector element independently while
preserving the original scalar behaviour (no names attribute on output).

Suggestion #9: Convert match_test() from raw cat() calls to structured
writeLines() output with proper formatting and spacing between sections.
2026-08-09 14:35:09 -04:00