You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of #54. Depends on the token-set expansion (#56).
Problem
renderButton (render/button.go:39-41) acts only on borderless; primary is explicitly ignored with the documented rationale (render/button.go:14-20) that monochrome leaves no free attribute — bold is the base style and reverse-video is reserved for focus.
That rationale is correct for the default styles but dissolves once hosts can inject color: a themed host (crush mapping its accent color) has an obvious way to distinguish the main call-to-action, and the A2UI basic catalog explicitly defines primary as "the main call-to-action button".
DefaultStyles() sets ButtonPrimary = Button and ButtonPrimaryFocused = ButtonFocused, so monochrome output is byte-identical to today — the distinction only appears when a host overrides the slots.
Update the rationale comment in render/button.go to describe the new mechanism.
Test: default render unchanged for a primary button; with an overridden ButtonPrimary, primary and default buttons render differently and focus still uses the focused variant.
Part of #54. Depends on the token-set expansion (#56).
Problem
renderButton(render/button.go:39-41) acts only onborderless;primaryis explicitly ignored with the documented rationale (render/button.go:14-20) that monochrome leaves no free attribute — bold is the base style and reverse-video is reserved for focus.That rationale is correct for the default styles but dissolves once hosts can inject color: a themed host (crush mapping its accent color) has an obvious way to distinguish the main call-to-action, and the A2UI basic catalog explicitly defines
primaryas "the main call-to-action button".Fix
Variant == "primary"through the newButtonPrimary/ButtonPrimaryFocusedslots from Expand render.Styles into a complete token set (component slots + Glyphs) #56.DefaultStyles()setsButtonPrimary = ButtonandButtonPrimaryFocused = ButtonFocused, so monochrome output is byte-identical to today — the distinction only appears when a host overrides the slots.render/button.goto describe the new mechanism.ButtonPrimary, primary and default buttons render differently and focus still uses the focused variant.