Repository navigation
spec(theme): surface-specific status color roles - #8116
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewModified ComponentsBanner (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual Regression46 of 502 shot(s) changed. A change here is a question, not a failure: check whether the after is the
and 26 more. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
There was a problem hiding this comment.
This can't be approved yet: it adds new requirements to five current records (theme-tokens INV11, theme-compilation INV16, Banner FR9, and the Neutral and Matcha theme records), and no owner has approved this exact head. An engineering owner (or a design owner, for the Banner, Neutral and Matcha records) records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so if they are an engineering owner; the decision should also settle option A or B for status icons and borders. Whatever the decision, a few record facts need fixing first:
- The Neutral local-token values, the Matcha contrast exceptions and Banner FR9's "Current behavior" state describe the implementation PR's values, not what the packages ship at this head, so land them with the implementation or keep today's facts here.
- Neutral's DEC-1 decider date and
approved_atrecord an adoption that no exact-head approval supports. - INV11 promises chromatic status colours in every theme, but INV16 derives Info from any theme's accent, including a grey or near-black one.
- Neutral's compatibility paragraph drops the migration-or-alias rule from AST-006 FR10, and the INV11 verification row cites tests that don't exist yet.
[Automated review]
| | `--astryx-theme-neutral-color-status-fill-success` | Filled success status | `[green.light[45], green.dark[65]]` | | ||
| | `--astryx-theme-neutral-color-status-fill-warning` | Filled warning status | `[yellow.light[85], yellow.dark[85]]` | | ||
| | `--astryx-theme-neutral-color-status-fill-error` | Filled error status | `[red.light[50], red.dark[65]]` | |
There was a problem hiding this comment.
These values don't match what Neutral ships at this head: neutralTheme.ts sets the success, warning and error fills to ['#198100', '#64af4c'], '#ffce2f' and ['#c9303a', '#ff705d'], and green.dark[65], yellow.dark[85] and red.light[50] aren't in the selected-stop module. Since this record makes the exact value a compatibility contract, these rows should land with the source change that ships them.
| **Reference:** `theme:neutral/DEC-1` | ||
| **System-boundary decider:** `cixzhang`, `2026-08-31` | ||
| **Final Neutral adoption decider:** `rubyycheung`, after OQ1 passes and exact-head review | ||
| **Final Neutral adoption decider:** `rubyycheung`, `2026-10-17` |
There was a problem hiding this comment.
This records the adoption decision as made on 2026-10-17, but no approval of this head exists, and the current DEC-1 waits for OQ1 and an exact-head review. Leave this date, and approved_at on line 8, for the approving owner to set.
| A Neutral-local name, enrolled theme name, exact value, or semantic meaning may | ||
| change only through an owner-approved compatibility update recorded here. |
There was a problem hiding this comment.
AST-006 FR10 requires a rename or meaning change to use an explicit reviewed migration or alias that preserves the prior contract, and the current paragraph says so. This sentence drops that rule; restore it or link FR10.
| - light success, warning, and error Banner descriptions and FieldStatus text are | ||
| 4.58:1, 5.01:1, and 4.73:1 when their translucent fills are composited over | ||
| white. Over the light body `#f0f0e0`, the same pairs are 4.03:1, 4.42:1, and | ||
| 4.14:1. The status icon, title, and written description identify each state | ||
| independently of color; |
There was a problem hiding this comment.
At this head Matcha still ships the pairs this replaces: Banner descriptions are 3.83, 4.11 and 3.54:1 over white, warning FieldStatus text is 2.52:1, the success Badge is 3.58:1 (light), and the error Badge and destructive Button are 4.06:1 (light) and 3.23:1 (dark). The new ratios hold only after the implementation's Matcha changes.
| | FR6 | The Banner frame exposes `banner-frame` and reflects `container` and `elevation`. The existing `banner` target remains on the Status surface rather than moving to the outermost DOM element. | Owner decision; current source and tests | Current behavior | | ||
| | FR7 | `banner-frame` is additive. The existing `banner`, `banner-icon`, `banner-description`, and `banner-content` targets and their current axes remain unchanged. | Current target inventory; compatibility policy | Current behavior | | ||
| | FR8 | `status` controls visual meaning only and MUST NOT derive `role`, `aria-live`, or an announcement. Standard DOM props MAY provide an explicit persistent role, except on a Banner added inside a mounted live container (`spec:AST-086` FR4). Async outcomes MUST announce from the transition handler through `useAnnounce`, except inside a mounted live container, where `spec:AST-086` FR4 applies; `role="alert"` is reserved for genuinely urgent interruptive content. | Accessibility Checklist §Announcements; owner decision | Current behavior | | ||
| | FR9 | The status surface paints its built-in title, description, icon, collapse, and dismiss content with the matching `--color-on-*-muted` role. Banner supplies that semantic foreground context to each built-in Button element without changing Button-owned geometry or interaction layers; a sibling tooltip keeps Button's ordinary theme color. Consumer-provided `endContent` remains untouched. | Status-role architecture; Banner and Button source/tests | Current behavior | |
There was a problem hiding this comment.
FR9 is marked "Current behavior", but at this head Banner still paints its title and description with --color-text-primary and --color-text-secondary, and no --color-on-*-muted token exists. Mark it as a target, or land it with the implementation.
| Every status fill and status text colour is chromatic in every theme: no | ||
| theme paints one in a neutral grey, near-black, or near-white. The floors hold |
There was a problem hiding this comment.
INV16 derives --color-info-emphasized from an authored accent pair, so a theme whose accent is grey or near-black gets a grey or near-black Info fill, which this sentence says no theme paints. Scope the guarantee to Core defaults and first-party themes, or say that derivation doesn't apply when its source would break it.
| | INV8 | `defineTheme.test.ts`, template checks, and token-doc generation | A local name enters portable helpers/docs or can conflict with a portable declaration | | ||
| | INV9 | `tokens.test.ts` (core defaults), `SpacingRootFontSize.a11y.chromium.spec.ts` (real-Chromium root font size), each overriding theme's `*Theme.spacing.test.ts`, `check-cli-theme-bundle.test.mjs` (bundled copies byte-equal to the packages), `theme-concentricity.test.ts` (playground ramp read in rem) | A spacing step in `px` that no theme documents as its exception: a core default, a theme override, a bundled copy, or a generated ramp step | | ||
| | INV10 | `tokens.test.ts` name check over `colorDefaults` and `domainTokenDefaults` | A colour token name fits none of the five shapes | | ||
| | INV11 | `scripts/check-muted-status-contrast.test.mjs` (resolves global and Banner pale-surface role pairs), `scripts/check-badge-contrast.test.mjs` (resolves Core Badge defaults plus theme overrides), `scripts/check-status-text-contrast.test.mjs` (resolves `--color-text-<status>` against the surface and card tokens and checks that each status fill and text colour is chromatic in every first-party theme), `neutralTheme.test.ts` (pins reviewed role values and pairings), `tailwind-theme.test.ts` (pins the status utilities, including the released base ones), forced-colors assertions in the Badge, StatusDot, and Banner tests, and theme alias-generation tests | A status role is missing, mispaired, grey, routed to the wrong public utility, or falls below its contrast threshold in light or dark mode, a status fill loses its border in forced-colors mode, or a released base status token or utility changes value | |
There was a problem hiding this comment.
scripts/check-muted-status-contrast.test.mjs and scripts/check-status-text-contrast.test.mjs don't exist at this head (the second isn't in the implementation PR either), and no Badge, StatusDot or Banner test asserts forced colors yet. Cite existing tests or mark this evidence as planned.
3a4609f to
31907e5
Compare
Records the status-role contract from the status color roles implementation: theme-tokens status roles, the compiler's generated compatibility roles, Banner's status foreground (FR9), and the Neutral and Matcha mappings. Invariants are renumbered to follow the colour token grammar (theme-tokens INV11) and the built-icon invariant (theme-compilation INV16).
Adjusts the status-role contract so released tokens keep their meaning: --color-success/warning/error and their Tailwind utilities are unchanged in every theme. The strong fill is --color-<status>-emphasized with --color-on-<status>; status text, icons, and borders use --color-text-<status> (4.5:1 on the default surfaces); pale fills keep --color-<status>-muted with --color-on-<status>-muted. Every role keeps its status hue in every theme. Co-authored-by: rubyycheung <[email protected]>
--color-icon-<status> and --color-border-<status> follow the per-hue icon and border families and default to --color-text-<status>.
…INV17) A theme that sets only its base status colours compiles to a complete, contrast-valid, chromatic status set. Icon and border alias text; set values always win; runtime and build derive the same values.
d5abf80 to
485f4df
Compare
There was a problem hiding this comment.
This can't be approved yet: it adds new requirements to five current records (theme-tokens INV11, theme-compilation INV16 and INV17, Banner FR9, and the Neutral and Matcha theme records), and no owner has approved this exact head. An engineering owner (or a design owner, for the Neutral and Matcha records) records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Whatever the decision, a few record facts need fixing first:
- The Neutral status-fill values, the Matcha contrast exceptions and Banner FR9's "Current behavior" state describe what the implementation would ship, not what the packages ship today.
- INV16 and INV17 are missing from theme-compilation's list of accepted-but-unshipped invariants, and INV11's verification row cites tests that don't exist yet.
- Neutral's
approved_atand DEC-1 decider date record an adoption that no exact-head approval supports, and its compatibility paragraph drops AST-006 FR10's migration-or-alias rule. - INV17's muted derivation yields a full-strength fill when a theme's
--color-accent-mutedis opaque, as Neutral's is, and INV11's every-theme chromatic and 3:1 rules can't be checked for themes Astryx doesn't ship.
[Automated review]
| | `--astryx-theme-neutral-color-status-fill-success` | Filled success status | `[green.light[45], green.dark[65]]` | | ||
| | `--astryx-theme-neutral-color-status-fill-warning` | Filled warning status | `[yellow.light[85], yellow.dark[85]]` | | ||
| | `--astryx-theme-neutral-color-status-fill-error` | Filled error status | `[red.light[50], red.dark[65]]` | |
There was a problem hiding this comment.
These values aren't what Neutral ships at this head: neutralTheme.ts:37-39 sets ['#198100', '#64af4c'], '#ffce2f' and ['#c9303a', '#ff705d'], and green.dark[65], yellow.dark[85] and red.light[50] aren't in neutralPaletteRefs.generated.ts. Since the compatibility paragraph makes the exact value a contract, these rows should land with the source change that ships them.
| Portable semantic token names remain stable across themes. Neutral-local status | ||
| roles remain emitted for Neutral extensions, but Core does not depend on them. | ||
| A Neutral-local name, enrolled theme name, exact value, or semantic meaning may | ||
| change only through an owner-approved compatibility update recorded here. |
There was a problem hiding this comment.
AST-006 FR10 requires a rename or meaning change to use an explicit reviewed migration or alias that preserves the prior contract, and the current paragraph says so. This sentence drops that rule; restore it or link FR10.
| **Reference:** `theme:neutral/DEC-1` | ||
| **System-boundary decider:** `cixzhang`, `2026-08-31` | ||
| **Final Neutral adoption decider:** `rubyycheung`, after OQ1 passes and exact-head review | ||
| **Final Neutral adoption decider:** `rubyycheung`, `2026-10-17` |
There was a problem hiding this comment.
This records the adoption as decided on 2026-10-17, but no approval of this head exists, and the current DEC-1 waits for OQ1 and a ratification of the exact record head. Leave this date, and approved_at on line 8, for the approving owner to set, and keep OQ1 until its evidence is cited.
| - light success, warning, and error Banner descriptions and FieldStatus text are | ||
| 4.58:1, 5.01:1, and 4.73:1 when their translucent fills are composited over | ||
| white. Over the light body `#f0f0e0`, the same pairs are 4.03:1, 4.42:1, and | ||
| 4.14:1. The status icon, title, and written description identify each state | ||
| independently of color; |
There was a problem hiding this comment.
At this head Matcha still ships the pairs this replaces: info, success, warning and error Banner descriptions are 3.88, 3.83, 4.11 and 3.54:1 over white, warning FieldStatus text is 2.52:1, the success Badge is 3.58:1 light and 4.25:1 dark, and the error Badge and destructive Button are 4.06:1 light and 3.23:1 dark. The new ratios hold only after the implementation's changes.
| | FR6 | The Banner frame exposes `banner-frame` and reflects `container` and `elevation`. The existing `banner` target remains on the Status surface rather than moving to the outermost DOM element. | Owner decision; current source and tests | Current behavior | | ||
| | FR7 | `banner-frame` is additive. The existing `banner`, `banner-icon`, `banner-description`, and `banner-content` targets and their current axes remain unchanged. | Current target inventory; compatibility policy | Current behavior | | ||
| | FR8 | `status` controls visual meaning only and MUST NOT derive `role`, `aria-live`, or an announcement. Standard DOM props MAY provide an explicit persistent role, except on a Banner added inside a mounted live container (`spec:AST-086` FR4). Async outcomes MUST announce from the transition handler through `useAnnounce`, except inside a mounted live container, where `spec:AST-086` FR4 applies; `role="alert"` is reserved for genuinely urgent interruptive content. | Accessibility Checklist §Announcements; owner decision | Current behavior | | ||
| | FR9 | The status surface paints its built-in title, description, icon, collapse, and dismiss content with the matching `--color-on-*-muted` role. Banner supplies that semantic foreground context to each built-in Button element without changing Button-owned geometry or interaction layers; a sibling tooltip keeps Button's ordinary theme color. Consumer-provided `endContent` remains untouched. | Status-role architecture; Banner and Button source/tests | Current behavior | |
There was a problem hiding this comment.
FR9 is marked "Current behavior", but at this head Banner paints its title and description with --color-text-primary and --color-text-secondary (Banner.tsx:283, :295), and no --color-on-*-muted token exists. Mark it as a target, or land it with the implementation.
| - `--color-<status>-muted` is the status hue at the opacity of the theme's | ||
| `--color-accent-muted` (Core: 20% light, 25% dark), and `--color-on-<status>-muted` is the status hue at the | ||
| lightness that reaches 4.5:1 on that fill over the default surface. |
There was a problem hiding this comment.
When a theme's --color-accent-muted is opaque, as Neutral's is (#f1f1f1 / #262626), "the opacity of the theme's --color-accent-muted" is 100%, so the derived muted fill is the full status hue rather than INV11's pale fill. Define the pale level without relying on that alpha (for example Core's 20% / 25%), and add an opaque case to the INV17 verification row.
| Authored destination roles, source order, `!important`, `inherit`, concrete | ||
| values, and cycles retain their normal CSS meaning. Runtime and static output | ||
| use the same derivation. | ||
| - **INV17 — Theme generation establishes every status role.** For each |
There was a problem hiding this comment.
Nothing derives status roles at this head, but the gaps section below lists only INV13-INV14 and the INV11 prefix clause as accepted but unshipped, then calls the remaining invariants the current contract. List INV16 and INV17 there until the implementation lands.
| | INV8 | `defineTheme.test.ts`, template checks, and token-doc generation | A local name enters portable helpers/docs or can conflict with a portable declaration | | ||
| | INV9 | `tokens.test.ts` (core defaults), `SpacingRootFontSize.a11y.chromium.spec.ts` (real-Chromium root font size), each overriding theme's `*Theme.spacing.test.ts`, `check-cli-theme-bundle.test.mjs` (bundled copies byte-equal to the packages), `theme-concentricity.test.ts` (playground ramp read in rem) | A spacing step in `px` that no theme documents as its exception: a core default, a theme override, a bundled copy, or a generated ramp step | | ||
| | INV10 | `tokens.test.ts` name check over Astryx's own `colorDefaults` and `domainTokenDefaults` only | A colour token Astryx defines fits none of the five shapes | | ||
| | INV11 | `scripts/check-muted-status-contrast.test.mjs` (resolves global and Banner pale-surface role pairs), `scripts/check-badge-contrast.test.mjs` (resolves Core Badge defaults plus theme overrides), `scripts/check-status-text-contrast.test.mjs` (resolves `--color-text-<status>`, `--color-icon-<status>`, and `--color-border-<status>` against the surface and card tokens and checks that each status fill and text colour is chromatic in every first-party theme), `neutralTheme.test.ts` (pins reviewed role values and pairings), `tailwind-theme.test.ts` (pins the status utilities, including the released base ones), forced-colors assertions in the Badge, StatusDot, and Banner tests, and theme alias-generation tests | A status role is missing, mispaired, grey, routed to the wrong public utility, or falls below its contrast threshold in light or dark mode, a status fill loses its border in forced-colors mode, or a released base status token or utility changes value | |
There was a problem hiding this comment.
scripts/check-muted-status-contrast.test.mjs, scripts/check-status-text-contrast.test.mjs and tailwind-theme.test.ts don't exist at this head, and no Badge, StatusDot or Banner test asserts forced colors. Cite existing tests, or mark this evidence as implementation acceptance as the theme-compilation record does for INV13-INV14.
| Every status fill and status text colour is chromatic in every theme: no | ||
| theme paints one in a neutral grey, near-black, or near-white. The floors hold |
There was a problem hiding this comment.
INV17 lets a value a theme sets always win, and the verification checks first-party themes only, so a third-party theme can set a grey status text colour and nothing fails. Scope this rule (and the 3:1 rule for a theme's own icon and border colours) to Astryx's own themes as INV10 does, or state it as a requirement on theme authors.
|
/approve-spec 485f4df |
Banner FR9 and theme-compilation INV16-INV17 are accepted targets until the implementation lands; INV11's evidence is implementation acceptance. The contrast and chromatic rules bind Core, first-party themes, and derived values. Derived pale fills use Core's 20%/25% strength. Neutral keeps its shipped values, dates, and AST-006 FR10 compatibility rule; Matcha's measured exceptions stay as shipped. Theme values move with the implementation.
INV17 derives only the new pale Info fill; --color-success/warning/error-muted are released and keep their values.
|
/approve-spec 9a43a85 |
There was a problem hiding this comment.
Changes requested: an engineering owner has approved the status-role direction for this head, and four record fixes remain. Please amend the records as below, then ask an engineering owner to comment /approve-spec <full head SHA> on the new head, since a new commit resets the approval.
- INV17 makes
defineThemederive status roles, butarchitecture:theme-authoring-contract's precedence order has no step for them and does not say whether a role inherited throughextendscounts as set, so amend that record (or keep INV17 to compiler output) and add anextendscase to INV17's verification. --color-info-mutedshipped until v0.0.8 with a purple meaning and the v0.0.8 codemod still rewrites it to--color-background-purple, so record the reuse as a compatibility decision or pick a name that never shipped.theme:neutralno longer describes the status-fill and tint mappings Neutral ships while OQ2 still refers to that list, and DEC-4's new sentence sits under its 2026-09-04 decider line.- Banner FR9 should name the status surface's fill, because Info is painted on
--color-accent-muted, which no floor pairs with--color-on-info-muted.
[Automated review]
| use the same derivation. | ||
| - **INV17 — Theme generation establishes every status role.** For each | ||
| `architecture:theme-tokens` INV11 status role a theme does not set, | ||
| `defineTheme` and the theme build derive one, so a theme that sets only its |
There was a problem hiding this comment.
This makes defineTheme derive status roles, but architecture:theme-authoring-contract owns normalization and its one precedence order (resolved base, generated values, explicit tokens) has no step for derived roles; that record is not amended here, and this record says it does not own authoring precedence or inheritance (line 232). Since extends carries forward resolved tokens, please say whether a role inherited from the parent counts as set, place the step in the authoring contract, and add an extends case to the INV17 verification row.
| mode. | ||
| - `--color-<status>-emphasized` is the status hue, adjusted only as far as | ||
| needed for the theme's `--color-on-<status>` to reach 4.5:1 on it. | ||
| - `--color-info-muted` is the Info hue at Core's pale-fill strength, 20% |
There was a problem hiding this comment.
--color-info-muted is a released name: v0.0.6 renamed --color-educational-deemphasized to it, v0.0.8 removed it, and the v0.0.8 transform still rewrites it to --color-background-purple (packages/cli/assets/codemods/transforms/v0.0.8/migrate-token-renames.mjs:57), so astryx upgrade --from any earlier version would turn the new pale Info fill purple. Please record the reuse as a compatibility decision or pick a name that never shipped.
| AvatarStatusDot, Stepper indicators, and ProgressBar wherever the existing state | ||
| already has the same semantic meaning. Banner uses the proposed tint-content and | ||
| interaction roles. Every mapping remains subject to exact-head theme review and | ||
| Core components choose semantic roles by surface (`architecture:theme-tokens` |
There was a problem hiding this comment.
Neutral still ships the mappings the replaced paragraph described (local status fills on Badge, StatusDot, AvatarStatusDot, Stepper indicators and ProgressBar, and the tint roles on Banner, in neutralTheme.ts), and no INV11 role yet, while this record says it documents shipped output and OQ2 still asks about every listed component mapping. Keep the shipped mappings here and add the INV11 roles as the target.
| | FR6 | The Banner frame exposes `banner-frame` and reflects `container` and `elevation`. The existing `banner` target remains on the Status surface rather than moving to the outermost DOM element. | Owner decision; current source and tests | Current behavior | | ||
| | FR7 | `banner-frame` is additive. The existing `banner`, `banner-icon`, `banner-description`, and `banner-content` targets and their current axes remain unchanged. | Current target inventory; compatibility policy | Current behavior | | ||
| | FR8 | `status` controls visual meaning only and MUST NOT derive `role`, `aria-live`, or an announcement. Standard DOM props MAY provide an explicit persistent role, except on a Banner added inside a mounted live container (`spec:AST-086` FR4). Async outcomes MUST announce from the transition handler through `useAnnounce`, except inside a mounted live container, where `spec:AST-086` FR4 applies; `role="alert"` is reserved for genuinely urgent interruptive content. | Accessibility Checklist §Announcements; owner decision | Current behavior | | ||
| | FR9 | The status surface paints its built-in title, description, icon, collapse, and dismiss content with the matching `--color-on-*-muted` role. Banner supplies that semantic foreground context to each built-in Button element without changing Button-owned geometry or interaction layers; a sibling tooltip keeps Button's ordinary theme color. Consumer-provided `endContent` remains untouched. | Status-role architecture; Banner and Button source/tests | Accepted target | |
There was a problem hiding this comment.
INV11 sets the 4.5:1 floor for --color-on-<status>-muted on --color-<status>-muted, but Banner's info surface is painted with --color-accent-muted (Banner.tsx:352). Please say which fill the status surface uses, for example --color-info-muted for Info, so the content pair has a floor.
…Banner fill INV17 is compiler output with matching non-CSS resolution, and states how extends counts inherited roles. theme-tokens DEC-2 records the reuse of the retired Info names. Banner FR9 names the status surface fill. Neutral's record moves with the implementation.
There was a problem hiding this comment.
This can’t be approved yet: it adds new requirements to three current records (theme-tokens INV11 and DEC-2, theme-compilation INV16 and INV17, and Banner FR9), and no owner has approved this exact head, since the earlier /approve-spec comments name previous heads. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so if they are an engineering owner. Whatever the decision, two record fixes remain:
- INV17 says every unset status role is derived but gives no rule for
--color-on-<status>, which its-emphasizedrule depends on, so--color-on-infois undefined; its chromatic promise also needs a fallback for a grey base status colour, and its verification row a non-CSS resolution case. - Banner’s ownership bullet, action/dismiss design row and anatomy paragraph describe FR9’s accepted target as shipped behaviour.
[Automated review]
| - `--color-<status>-emphasized` is the status hue, adjusted only as far as | ||
| needed for the theme's `--color-on-<status>` to reach 4.5:1 on it. |
There was a problem hiding this comment.
This rule is computed from --color-on-<status>, but INV17’s list never says how an unset --color-on-<status> is obtained, and Info has no released --color-on-info. Please add a bullet, for example: the released --color-on-success, --color-on-warning and --color-on-error are never derived, and --color-on-info takes --color-on-accent (the pair INV16 already treats as Info’s).
| - The semantic foreground context for Banner-authored title, description, icon, | ||
| collapse, and dismiss content on the status surface. Built-in controls receive | ||
| that context on their Button element only, so their tooltip remains an ordinary | ||
| Button surface. |
There was a problem hiding this comment.
FR9 is an accepted target, but this bullet (and the action/dismiss design row and the anatomy paragraph) states it as shipped: at this head the built-in collapse and dismiss controls are ghost Buttons whose icons inherit the Button colour. Please mark these statements as FR9’s target.
…R9 target INV17 states how --color-on-<status> is obtained, falls back to Core's hue for a grey base status colour, keeps the alias for a non-concrete source, and verifies non-CSS resolution. Banner's ownership, design and anatomy text mark FR9 as the accepted target.
|
/approve-spec 54d075d |
There was a problem hiding this comment.
Changes requested: the status-role direction is approved for this head, and one record fix remains. INV17's new fallback for a status source that is not a concrete colour (“keeps the INV16 alias”) names no value for the roles INV17 computes and contradicts INV11's promise that derived values meet the contrast floors and stay chromatic, so please name what each role holds in that case, say whether it sits outside those guarantees or must meet them, and add that case to the INV17 verification row. Banner's requirement-table intro also still says every row is current behaviour or the frame target, while FR9 is an accepted target. After the fix, an engineering owner needs to comment /approve-spec <full head SHA> on the new head, since a new commit resets the approval.
[Automated review]
| fill and text colour is chromatic. A source that is not a concrete colour, | ||
| such as an unresolved reference, keeps the INV16 alias instead. A value the theme sets always wins over a derived one. A |
There was a problem hiding this comment.
INV16 says where a derived alias is emitted but never which token each role aliases, and INV17 computes text, strong fill, the pale Info fill and pale-fill content rather than aliasing them, so this alias has no stated value for those roles. Whatever it is, it forwards a colour the compiler cannot measure, while architecture:theme-tokens INV11 says derived values meet the contrast floors and stay chromatic. Please name what each role holds for a non-concrete source, say whether that alias sits outside INV11's guarantees or must meet them, and add a non-concrete source to the INV17 fixtures.
| The requirements below describe the current implementation and its additive | ||
| frame target contract. |
There was a problem hiding this comment.
FR9 below is an accepted status-colour target, neither current behaviour nor the frame target. Suggest: “describe the current implementation, its additive frame target contract, and FR9's accepted status-colour target.”
INV17 lists what each role holds when its source cannot be measured, places those aliases outside the derived-value floors for third-party themes, and adds an unresolved-reference fixture. Banner's requirement intro names FR9's accepted target.
|
/approve-spec 4abfa10 |
There was a problem hiding this comment.
Changes requested: the status-role direction is approved for this head, and two record fixes remain. INV17's new fallback covers a status colour that isn't a concrete colour, but not the page and card surfaces, pale fill or --color-on-<status> its computations measure against, so a theme that sets one of those to an unresolved reference gets no defined value while INV11 says derived values meet the contrast floors; please extend the fallback to those inputs, say what each role holds then, and add that case to the INV17 verification row. Banner's compatibility section also still says its visual output is unchanged, although FR9 changes the Info fill and every built-in content colour. After the fixes, an engineering owner needs to comment /approve-spec <full head SHA> on the new head, since a new commit resets the approval.
[Automated review]
| fill and text colour is chromatic. A source that is not a concrete colour, | ||
| such as an unresolved reference, cannot be measured, so for that status each | ||
| role aliases its INV16 source instead: the strong fill aliases the base | ||
| status colour (the accent for Info), `--color-info-muted` aliases | ||
| `--color-accent-muted`, and the text and pale-fill content roles alias the | ||
| theme's matching hue text token (`--color-text-blue`, `-green`, `-yellow`, | ||
| or `-red`). Those aliases carry the theme's own values: they are not derived | ||
| values, so INV11's floors bind them only in Core and first-party themes, | ||
| which use concrete sources. A value the theme sets always wins over a derived |
There was a problem hiding this comment.
This fallback covers a status colour that isn't a concrete colour, but the computed roles above also measure the theme's page and card surfaces, the pale fill and --color-on-<status>. When one of those is an unresolved reference (say --color-background-card: var(--host-card)), INV17 gives no value, while theme-tokens INV11 says derived values meet the contrast floors. Suggest extending the clause to any colour a computation measures, naming what each role holds then (the same aliases would do), and adding an unresolved-surface fixture to the INV17 verification row.
| | FR6 | The Banner frame exposes `banner-frame` and reflects `container` and `elevation`. The existing `banner` target remains on the Status surface rather than moving to the outermost DOM element. | Owner decision; current source and tests | Current behavior | | ||
| | FR7 | `banner-frame` is additive. The existing `banner`, `banner-icon`, `banner-description`, and `banner-content` targets and their current axes remain unchanged. | Current target inventory; compatibility policy | Current behavior | | ||
| | FR8 | `status` controls visual meaning only and MUST NOT derive `role`, `aria-live`, or an announcement. Standard DOM props MAY provide an explicit persistent role, except on a Banner added inside a mounted live container (`spec:AST-086` FR4). Async outcomes MUST announce from the transition handler through `useAnnounce`, except inside a mounted live container, where `spec:AST-086` FR4 applies; `role="alert"` is reserved for genuinely urgent interruptive content. | Accessibility Checklist §Announcements; owner decision | Current behavior | | ||
| | FR9 | The status surface fills with the matching `--color-<status>-muted` role (`--color-info-muted` for Info) and paints its built-in title, description, icon, collapse, and dismiss content with the matching `--color-on-<status>-muted` role. Banner supplies that semantic foreground context to each built-in Button element without changing Button-owned geometry or interaction layers; a sibling tooltip keeps Button's ordinary theme color. Consumer-provided `endContent` remains untouched. | Status-role architecture; Banner and Button source/tests | Accepted target | |
There was a problem hiding this comment.
FR9 changes Banner's look (the Info fill and every built-in content colour), but the Compatibility and migration section (line 43) still says "visual output … unchanged". Please add FR9's visual change there, or scope that sentence to DEP-0007.
INV17's alias fallback covers the page and card surfaces, the pale fill and --color-on-<status> as well as the status source, with an unresolved-surface fixture. Banner's compatibility section scopes the unchanged-visuals claim to DEP-0007 and names FR9's visual change.
There was a problem hiding this comment.
This can't be approved yet because no engineering owner has approved this exact head: the earlier /approve-spec comments name previous heads, and this commit changes INV17's fallback and Banner's compatibility line. The two record fixes requested on the previous head are made, and nothing else needs to change. An engineering owner records the decision on theme-tokens INV11 and DEC-2, theme-compilation INV16 and INV17, and Banner FR9 by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.
[Automated review]
|
/approve-spec 0d37594 |
People reading status in Astryx (Badges, Banners, field validation, status icons) get colours chosen for the surface they sit on: readable status text and icons on the page, a strong fill with matching content, and a pale fill with matching content. Apps that already use
--color-success,--color-warning,--color-error, ortext-success/bg-success/border-successsee no change.Builds on the colour token grammar (theme-tokens INV10, merged in #8103). It records the status-role contract from #7657 by @rubyycheung, with one adjustment: released tokens keep their meaning.
Exact decision needed
Which tokens Astryx components use for status colour on each surface, and what happens to the released base status tokens.
Existing authority searched
architecture:theme-tokens(INV1–INV9, plus INV10 grammar from spec(theme-tokens): name colour tokens by one grammar #8103),architecture:theme-compilationINV1–INV15,component:BannerFR1–FR8,theme:neutral,theme:matcha.--color-success/warning/erroron main uses the base for fills (Badge, StatusDot, ProgressBar, Stepper, Button destructive), text and icons (Icon, Stepper glyphs, Chat, DropdownMenu destructive, TextArea counter), and borders (input status borders, FileInput). So base-as-fill would change the meaning of the text, icon, and border uses.--color-info(mapping it to--color-icon-purple), so this record adds no bare--color-info.Decision
architecture:theme-tokensINV11: each status (info,success,warning,error) has three surface roles:--color-text-<status>for text, 4.5:1 or more;--color-icon-<status>and--color-border-<status>(default: the text colour), 3:1 or more--color-<status>-emphasized--color-on-<status>, 4.5:1 or more--color-<status>-muted--color-on-<status>-muted, 4.5:1 or more on the default surface--color-success,--color-warning,--color-errorand their Tailwind utilities keep their values and meaning in every theme. Astryx components use the surface roles instead.architecture:theme-compilationINV16: derived roles are emitted inside the scope where their source applies.architecture:theme-compilationINV17: the web compiler derives every status role a theme does not set, at runtime and in the theme build, and non-CSS resolution applies the same derivation. A role inherited throughextendscounts as set. Icon and border alias text; text is the status hue at 4.5:1 on the page and card; strong fills meet their content floor; the new pale Info fill uses Core's 20%/25% strength; on-muted reaches 4.5:1. The released--color-success/warning/error-mutedare never derived. Info uses the accent when it's chromatic, otherwise the theme's blue. Set values always win. INV16 and INV17 are listed as accepted but not yet shipped until the implementation lands.component:BannerFR9 (accepted target): the status surface fills with--color-<status>-mutedand its built-in content uses--color-on-<status>-muted.architecture:theme-tokensDEC-2: the Info roles reuse the retired--color-info-mutedname; the v0.0.8 codemod only runs for projects upgrading from before v0.0.8. Bare--color-infostays unused.Icon and border tokens
Status icons and status borders get their own names (as @rubyycheung's token comparison also proposed),
--color-icon-<status>and--color-border-<status>. They sit beside the per-hue--color-icon-redand--color-border-redfamilies, and each defaults to--color-text-<status>. A theme that sets its own keeps 3:1 or more against the default surfaces. In a names-only agent test, status icons used the readable status colour in 16 of 16 tries with icon tokens and 0 of 16 without; borders went from 0 of 8 to 8 of 8.Rejected alternatives
--color-success/warning/erroras strong fills: about 47 text, icon, and border uses on main, plus every app'stext-success, would change meaning.--color-background-<status>for the strong fill:--color-background-<hue>tokens are pale tints, so the name reads as pale.-emphasizedis the grammar's strong form, the counterpart of-muted.--color-status-foreground-<status>: it breaks the grammar (a group segment and a second property word);--color-text-<status>replaces it.Claim scope and non-goals
Names, surfaces, contrast floors, and compiler derivation. Exact per-theme values belong to the implementation (#7657) and the theme records. Lab components and chart palettes are out of scope.
Evidence and implementation relationship
#7657 implements this contract: tokens in all seven first-party themes, compiler derivation, Badge/Banner/Icon/StatusDot/ProgressBar/Stepper/input internals, Tailwind keys, docs, a Changeset, and contrast and role tests.
Writing rubric results
Scope
Validation
pnpm check:knowledgegit diff --checkCo-authored-by: @rubyycheung (the status-role contract and the Banner, Neutral, and Matcha records)