Skip to content

feat: plugin theme roles, meters, ornaments, clumps, and manifest version 2 - #240

Merged
jherforth merged 1 commit into
jherforth:mainfrom
mrramam:themes/roles
Oct 7, 2026
Merged

jherforth merged 1 commit into
jherforth:mainfrom
mrramam:themes/roles

Conversation

@mrramam

@mrramam mrramam commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Closes #218

Follow-up to the theme work (#239): plugins that follow the theme, meters, ornaments, clumps, and a manifest version for them.

Plugins follow the theme. The theme message (now version 2) carries role tokens, named for what a thing does rather than how one theme draws it:

Role Tokens
Surfaces and text --background, --surface, --card-bg, --text, --text-secondary, --border
Status --success, --warning, --hg-error
Shape --hg-radius-sm, -md, -lg
Type --hg-font-body, --hg-font-heading, --hg-heading-transform, --hg-heading-letter-spacing
Meters --hg-meter-track, -fill, -thickness, -cap

The SDK checks them like theme tokens and writes them onto the plugin's root, and registers the theme's fonts from its installed folder. Plugin CSS written against var(--text) then follows every theme. Version 1 plugins are unaffected, and a test keeps the SDK's list equal to the dashboard's. The plugin guide has the details.

Meters. Four role tokens for anything that shows a level or progress. Classic's values are today's refresh countdown, which now draws from them, so nothing changes until a theme sets its own.

Ornaments. A theme can list pictures from its folder anchored to a frame's corners, edges or center (corners mirrors one picture into all four). Every widget frame draws them, native and plugin alike, as a still layer with no pointer events. Themes make room with --hg-frame-inset, now capped at 24px a side; plugins already sit inside it.

Clumps. A sprite layer can gather its copies into patches with open ground between (clumps, clumpWidth), the way kelp grows from holdfasts. Without it, copies spread evenly as before.

Twinkles shrink as they fade, so dim means small, as in a still starfield.

Manifest version 2. Themes can be installed now, so per §5 of the architecture doc a shape change gets a version. Version 2 adds ornaments, meters and clumps. A theme too new for a HomeGlow says so plainly, translated: "Starship needs a newer version of HomeGlow. Update HomeGlow to use it." That shows in the store list in place of Install, on a folder upload, and for an installed theme. The version numbers go to the console and server log.

Also: the Classic token test compares paths with forward slashes, so it passes on Windows (reported on #237).

Reef and Starship 1.1.0 use all of this: kelp forests that grow in clumps, porthole-bolt ornaments and meters on Reef, meters and finer stars on Starship. I'll publish them to HomeGlowThemes once this merges.

Tested: client and server tests, i18n check and build; in a browser, ornaments on every frame in light and dark, meters, and three plugins receiving all role tokens and theme fonts. Running in our production install.

…sion 2

Plugins: the theme message (version 2) adds role tokens, named for what a
thing does: surfaces and text, status colors, radii, type and meters. The
SDK writes them onto the plugin's root after checking them as theme tokens
are checked, and registers the theme's fonts from its own installed folder,
so plugin CSS written against var(--text) or var(--hg-meter-fill) follows
every theme. Version 1 plugins are unaffected. A test holds the SDK's role
list equal to the dashboard's.

Meters: --hg-meter-track, -fill, -thickness and -cap. Classic's values are
the refresh countdown's current look, which now draws from them.

Ornaments: a theme may list pictures from its folder anchored to a frame's
corners, edges or center (`corners` mirrors one picture into all four).
Every widget frame draws them, native and plugin alike, as a still layer
with no pointer events. A theme makes room with --hg-frame-inset, now
capped at 24px a side; plugins already sit inside that inset.

Clumps: a sprite layer can gather its copies into patches with open
ground between (`clumps`, `clumpWidth`), as kelp grows from holdfasts.

Twinkles shrink as they fade, so dim means small, as in a still starfield.

Manifest version 2: themes can now be installed, so a shape change needs a
version (theme-architecture.md §5). Version 2 adds ornaments, meters and
clumps. A theme too new for a core says so plainly and in every language
("Starship needs a newer version of HomeGlow. Update HomeGlow to use
it."), in the store list in place of Install, on a folder upload, and for
an installed theme; the version numbers go to the console and server log.

Also: the Classic token test compares paths with forward slashes, so it
passes on Windows.
@mrramam mrramam changed the title feat: plugin theme roles, meters, ornaments, and manifest version 2 feat: plugin theme roles, meters, ornaments, clumps, and manifest version 2 Oct 7, 2026
@jherforth
jherforth merged commit 2009270 into jherforth:main Oct 7, 2026
3 checks passed
@mrramam
mrramam deleted the themes/roles branch October 9, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Proposal: themes, with today's look as the default

2 participants