feat(theme): add nordic / editorial / cinematic / monochrome BusinessTheme presets (@since 1.6.8)#118
Merged
Merged
Conversation
…Theme presets (@SInCE 1.6.8) Adds four contemporary BusinessTheme factory methods alongside the existing formal-skewed classic / modern / executive trio: - nordic() — cool whites + slate-blue + generous spacing (Scandinavian minimal, design-studio one-pagers) - editorial() — warm cream + deep ink + brick-red accent on a Times-Roman serif body (magazine, long-form proposals, annual reports) - cinematic() — DEEP NAVY SURFACE with light text + bright copper accent (inverted palette — first preset to ship a dark surface; tuned for investor pitch decks) - monochrome() — pure black on white with a single bold yellow accent (brutalist, fashion-cover style) Every new preset reuses the same internal `textScale()` and `tablePreset()` helpers as the existing trio, so a downstream template authored against any one preset gets the same matrix of style tokens (palette / spacing / textScale / tablePreset / optional pageBackground). The cinematic preset additionally uses the dark surface as the page background so the moody look fills the page edges. Class-level Javadoc updated to list all seven presets and group them as "formal" vs "contemporary". Test plan: - BusinessThemeTest expanded from 14 → 19 tests: * one positive-coverage test per new preset (asserts name, non-null tokens, distinctive trait — Times-Roman body for editorial, dark-on-light inversion for cinematic, etc.) * `allSevenBuiltInThemesArePairwiseDistinctByPalette` upgrades the previous three-theme distinctness check to the seven- theme pairwise matrix - `./mvnw verify -pl . -P japicmp` — **1037 tests pass**, 0 failures. japicmp vs v1.6.7 baseline: semver PATCH (compatible additions only, no breaking change).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds four contemporary
BusinessThemefactory presets alongsidethe existing formal-skewed trio (
classic/modern/executive).Pure additive new public API
@since 1.6.8— the existingpresets are untouched and japicmp reports
semver PATCH(compatible additions only).
The four new presets
nordic()#fcfdfe#243240#60768eeditorial()#faf5eb#161616#a03c32cinematic()#101824(dark!)#f5f8fc#dc8232monochrome()#f0c419Why these four
The existing trio is all formal and dark-on-light:
classic= navy + bright blue (financial / legal)modern= teal + gold on cream (cinematic-warm proposal)executive= slate + muted gold (boardroom)The contemporary set fills the gaps:
nordiccovers minimal / generous-whitespace design cultureeditorialcovers serif / magazine / long-form brand workcinematicis the first dark-surface preset — inverts the convention to white text on navy, with the surface doubling as the page background so the moody look fills the page edgesmonochromecovers brutalist / editorial-cover identity work where typographic contrast carries the entire designTogether: seven presets spanning the formal-to-design-studio
spectrum, every one a single
BusinessTheme.xxx()call away.What this PR does NOT touch
classic(),modern(),executive()— untouched. No risk ofbreaking existing consumers who pinned to a specific preset.
DocumentPalette/SpacingScale/TextScale/TablePresetrecords — untouched. No public-API surface change beyond the
four new static factories.
per-preset themes; the new factories are available if any
preset wants to adopt one.
Test plan
./mvnw test -pl . -Dtest=BusinessThemeTest -B -ntp—19 tests, 0 failures (14 existing + 5 new).
./mvnw verify -pl . -P japicmp— 1037 tests, 0failures; japicmp vs v1.6.7 baseline reports
semver PATCH(compatible additions only).allSevenBuiltInThemesArePairwiseDistinctByPaletteupgradesthe previous three-theme distinctness check to the full
pairwise matrix — every preset has a distinct palette + name.
Follow-ups (not in this PR)
PNG snapshots for each new preset. Best landed alongside Track N
(promote
PdfVisualRegressionto public API) so the same gatebecomes available to downstream consumers building their own
custom themes.
CustomBusinessThemeDemoTest— current demo only coversclassicderivation; could add a parametrised version thatshows how to fork each of the seven presets with
theme.withName(...)/theme.withPageBackground(...).