Skip to content

refactor(theme): move BusinessTheme out of the engine into examples-support#279

Merged
DemchaAV merged 1 commit into
2.0-devfrom
refactor/2.0-move-businesstheme-to-examples
Jul 1, 2026
Merged

refactor(theme): move BusinessTheme out of the engine into examples-support#279
DemchaAV merged 1 commit into
2.0-devfrom
refactor/2.0-move-businesstheme-to-examples

Conversation

@DemchaAV

@DemchaAV DemchaAV commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Why

BusinessTheme + its token bundle (DocumentPalette/SpacingScale/TextScale/TablePreset) is a Gen-2 design-token surface that no template takes anymore — only ~17 examples + 3 visual demo tests used it, as a standalone styling source. Move it into examples.support.theme so the engine's public API sheds it. Behaviour is unchanged (same code + values → example renders identical), so no baselines shift.

What (36 files: 7 renames, 2 adds, 1 delete, 26 edits)

  • git-mv the 5 types + their 2 unit tests → examples.support.theme; repoint the 17 example imports. Delete the engine document.theme package-info; add an examples one.
  • The 3 engine visual tests can't import an examples type, so repoint them onto a small engine-test testing/visual/DemoStyles helper (they assert a valid render, not a pixel baseline).
  • Drop document/theme from PublicApiNoEngineLeakTest's scan list and from the document.api package-info public-API {@link} list (was reference-not-found); reword the stale {@code BusinessTheme} javadoc in chart/ChartDefaults, chart/ChartTheme, layout/package-info, templates/api/DocumentTemplate.

The README's BusinessTheme hello-world snippet + DocumentationCoverageTest's contains("BusinessTheme") are gate-safe (string check passes) and are part of the deferred 3-13 docs pass.

Tests

./mvnw verify javadoc:javadoc -pl . — 1378 tests, 0 failures, javadoc clean. examples compile + the 2 moved unit tests pass; benchmarks test + perf-smoke + examples-generation smoke (85) green. japicmp report-only.

Note: one local examples layout-snapshot (EngineDeckLayoutSnapshotTest) fails on Windows — but EngineDeck is untouched by this PR, uses no moved type, and CI doesn't run examples tests (compile + exec only). Pre-existing Windows/Linux drift, unrelated.

Follow-ups: (a) the 2 moved unit tests now live in examples, whose tests CI doesn't run — a CI gap to close (or fold into the render coverage); (b) README BusinessTheme hello-world rework → 3-13 docs pass.

…upport

BusinessTheme and its token bundle (DocumentPalette / SpacingScale /
TextScale / TablePreset) are a Gen-2 design-token surface no template takes
anymore — only ~17 examples and 3 visual demo tests used it, as a standalone
styling source. Move the whole subsystem into examples.support.theme so the
engine's public API sheds it; behaviour is unchanged (same code and values,
so example renders are identical).

git-mv the 5 types + their 2 unit tests into examples.support.theme and
repoint the 17 example imports. The 3 engine visual tests cannot import an
examples type, so repoint them onto a small engine-test DemoStyles helper
(these tests assert a valid render, not a pixel baseline). Drop document.theme
from PublicApiNoEngineLeakTest's scan list and the document.api package-info
public-API list, and reword the stale BusinessTheme mentions in the chart,
layout, and template-api javadoc.

Tests: ./mvnw verify javadoc:javadoc -pl . — 1378 tests, 0 failures, javadoc
clean; examples compile + the moved unit tests pass; benchmarks + perf-smoke
+ examples-generation smoke (85) green.
@DemchaAV DemchaAV merged commit 0db1f30 into 2.0-dev Jul 1, 2026
11 checks passed
@DemchaAV DemchaAV deleted the refactor/2.0-move-businesstheme-to-examples branch July 1, 2026 20:51
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.

1 participant