Skip to content

feat(theme)!: standardize theme scopes and remove legacy APIs - #212

Open
leoafarias wants to merge 4 commits into
fix/widgets-app-examplesfrom
feat/generated-theme-modes
Open

leoafarias wants to merge 4 commits into
fix/widgets-app-examplesfrom
feat/generated-theme-modes

Conversation

@leoafarias

@leoafarias leoafarias commented Sep 13, 2026

Copy link
Copy Markdown
Member

Description

Add theme, darkTheme, and mode to FortalScope and both generated preset scopes. Root scopes supply light/dark defaults and follow live system brightness. A supplied theme without darkTheme is used in both modes; nested scopes inherit the configured pair and current selection. The application owns the mode preference.

Use WidgetsApp throughout the dashboard, examples, generated-consumer hosts, documentation, skills, and downloadable tutorials. Put routed scopes in the app builder above the Navigator. Preserve application-owned custom tokens. The scope supplies appearance; no new app wrapper is introduced.

Enforce the hard cutoff with a lexical guard that handles comments, strings, named constructors, typed declarations, configured prefixes, and tutorial/integration tests while allowing unrelated scope APIs. Regression tests assert inherited token colors, custom-theme preservation, live dialogs, and text-style inheritance across host placements.

Related Issues

Stacked on #211. Merge #211 first, then retarget this PR to main.

Validation

Current follow-up commit:

  • Fresh CLI consumers analyze and pass: default 376 tests; Fortal 13 tests.
  • Fortal package: 822 tests; dashboard: 95 tests; demo: 61 tests.
  • Downloadable tutorials: default 13 tests; Fortal 14 tests.
  • Guard: 8 regression tests and the full repository/archive scan pass.
  • Documentation validator: 148 analyzable Dart examples pass.
  • Fortal template parity and both checked-in consumers pass; the declared token customization remains intact.
  • Canonical theme-test static analysis passes.
  • Current-head CI passed: full workspace tests, Windows CLI, icon checks, production docs/catalog/dashboard build, exported routes/assets, and static search.

The prior dashboard browser verification covered light/dark/system selection, charts, tables, dialog open/Escape, and no console errors. This follow-up changes test hosts and guidance without changing application runtime behavior. Original tutorial screenshots predate the host/theme migration; the archive contains updated tested source.

Checklist

  • Includes tests for changed behavior and enforcement.
  • Updates relevant documentation and skills.
  • Follow up on review comments.

Breaking Change

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

Remove default-scope data, FortalScope brightness, and configuration createScope APIs without aliases. Use theme for supplied values and mode for appearance selection. Theme data/configuration retains resolved brightness; intentional direct Fortal design options remain available. Migrate installed source and callers together.

@leoafarias leoafarias changed the title Add light, dark, and system themes to generated scopes feat(theme): add light, dark, and system themes to generated scopes Sep 13, 2026
@leoafarias leoafarias changed the title feat(theme): add light, dark, and system themes to generated scopes feat(theme)!: standardize theme scopes and remove legacy APIs Sep 13, 2026
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