Repository navigation
feat: plugin button roles, curved flybys, and manifest version 3 - #242
Merged
Merged
Conversation
Plugin buttons drew a fixed blend of the secondary and accent colors with the theme's text color. Under Starship that was peach text on a blue-to-orange blend, about 1.2:1. Five role tokens let a theme say how plugin buttons look: --hg-button-bg, --hg-button-text, --hg-button-radius, --hg-button-weight and --hg-button-quiet-border. Classic's values are the look plugin buttons have today, so nothing changes until a theme sets them. Flybys can follow a curve. `arc` is a slice of a long parabola whose turning point is usually off screen (planets); `wander` meanders, faces where it goes within `pitch`, and with `turn` may swim partway in and leave the way it came (fish). `glide`, `count`, `begin: underway`, `hue` and `angle` round it out. Paths are sampled into transform keyframes, since an offset-path path() is in pixels and auto rotation flips a picture moving left. Straight flybys keep their existing code. A tab with no widgets now shows the theme's scene; the grid and the phone layout each mount it, and neither mounts on an empty tab. The plugin SDK is served no-cache with an ETag. Its path never changes, so with max-age=3600 a display kept the previous release's SDK for an hour after an upgrade, and a hard reload did not refetch it. Themes that use the button tokens or the new flyby options declare manifestVersion 3; an older core refuses them as needing a newer HomeGlow. Cost (Chromium, 3 runs each): no change at a 4x CPU slowdown. At 20x, a meandering fish layer costs a few percent.
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.
Plugin buttons can follow the theme. Five role tokens (--hg-button-bg, -text, -radius, -weight, -quiet-border) reach plugins through the theme message and the SDK. Classic's values are today's plugin look, so nothing changes until a theme sets them.
Flybys can follow a curve:
arc(a slice of a long parabola, for planets) orwander(a meander that faces where it goes and may turn back, for eg fish, cars, spaceships), withglide,count,begin: underway,hueandangle. Straight flybys are unchanged.Also fixed:
Themes using any of this declare manifestVersion 3; older cores refuse them as needing a newer HomeGlow.
Tested in production and on a dev host under Classic, Starship and Reef.