Skip to content

feat(branding): whitelabel branding API + light/dark theming#261

Open
WilliamKarolDiCioccio wants to merge 5 commits into
mainfrom
feat/branding-customization
Open

feat(branding): whitelabel branding API + light/dark theming#261
WilliamKarolDiCioccio wants to merge 5 commits into
mainfrom
feat/branding-customization

Conversation

@WilliamKarolDiCioccio
Copy link
Copy Markdown
Collaborator

Summary

Adds a whitelabel branding API so a flavor can supply its own accent
colors, app name, and logo while the rest of the Soliplex design system
stays fixed — and splits the shell into light/dark themes.

The five commits are scoped to be reviewed in order; each compiles standalone.

Changes

  • SoliplexGlow — a radial-gradient backplate primitive in the design
    layer, for brand artwork that can't be inverted for the active theme. It
    bleeds outside its child's layout bounds and takes the child's size.
  • SoliplexColors.fromAccent — derives a palette from a single brand
    accent: drives primary and a readable onPrimary only; neutral surfaces,
    container tones, and status colors stay Soliplex. Adds copyWith.
  • Markdown theming moves into the design layerMarkdownThemeExtension
    leaves the room module and is baked into the theme factory, so flavors no
    longer hand-install it. Adds soliplexDarkTheme, sharing a _buildTheme
    parametrised by brightness.
  • SoliplexBranding + BrandLogo — per-flavor brand identity (light/dark
    accents, app name, one or two logos). BrandLogo picks the logo for the
    current brightness, falling back to the light logo on a SoliplexGlow halo
    (derived from the theme's onSurface) when no dark logo is supplied.
  • ShellConfig light/dark splittheme becomes lightTheme + optional
    darkTheme + themeMode, plumbed through to MaterialApp.router. The
    standard flavor builds both themes from a SoliplexBranding.

Notes for reviewers

  • The standard flavor routes even the default Soliplex branding through
    fromAccent. For the default dark accent this re-derives onPrimary as the
    canonical near-black (0A0A0A) rather than the hand-tuned 222222 — a
    negligible shift on a near-white button, called out for completeness.
  • No design tokens added; no design_system/ reference-bundle changes.

Test Plan

  • flutter test — 1333 passing; adds coverage for SoliplexGlow,
    fromAccent, soliplexDarkTheme, the baked-in markdown extension, and
    BrandLogo (logo selection + glow derivation).
  • flutter analyze — zero issues.
  • Manual testing — exercise light/dark + a non-default branding.

Related Issues

N/A

🤖 Generated with Claude Code

WilliamKarolDiCioccio and others added 5 commits May 21, 2026 19:08
SoliplexGlow paints a soft radial gradient behind its child and bleeds
outside the child's layout bounds, so it can back brand artwork that
cannot be inverted for the current theme without disturbing surrounding
layout. The glow is brightest at the center and fades to transparent at
its rim; the [extent] controls how far it radiates past each edge.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
SoliplexColors.fromAccent builds a palette from a single brand accent
color: it drives `primary` and picks a readable `onPrimary` foreground,
while every neutral surface, container tone, and status slot stays on
the Soliplex defaults. Container surfaces are deliberately brand-
independent — tinting a surface that hosts colored content distorts how
that content reads. Adds `copyWith` to back the derivation.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…theme

MarkdownThemeExtension moves out of the room module into the design
theme layer and is baked into the theme factory, so flavors no longer
hand-install it. soliplexLightTheme and the new soliplexDarkTheme are
now both built from a shared _buildTheme parametrised by brightness.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
SoliplexBranding carries a flavor's brand identity: light and dark
accent colors, an app name, and one or two logo widgets. BrandLogo
renders the mark for the current brightness, falling back to the light
logo on a SoliplexGlow backplate — its halo derived from the theme's
onSurface — when no dedicated dark logo is given. Both are exported
from the library surface.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
ShellConfig.theme becomes lightTheme plus an optional darkTheme and a
themeMode, all plumbed through to MaterialApp.router. The standard
flavor now builds both themes from a SoliplexBranding via
SoliplexColors.fromAccent and passes a BrandLogo to the auth module;
the flavor-local _defaultTheme and logo constants are gone. The home
screen centers the logo box so a glow backplate is not stretched by the
header column.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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