Repository navigation
Conversation
Glass (`@astryxdesign/theme-glass`) is a dark-only theme for dashboards: a deep navy canvas with soft glows on the app shell, glass cards with a light top edge, and one vivid hue per colored card. `<Card variant="<hue>">` tints the card and points its accent at the hue, so the charts, progress bars, links, and focus rings inside it match. - New package modeled on Gothic: palette request, generated dark ramps and receipt, selected palette refs, icons, README, and a draft theme record (`theme:glass`). - Contrast tests for text, accent, focus ring, control edges, and borders on every surface and every hue, plus a light/dark parity test. - Registered in Storybook, the sandbox, the docsite, the CLI bundle and discover list, the native Swift themes, the release config, and the shared first-party contrast tests.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Before | After | Change | |
|---|---|---|---|
| Job-minutes per PR update | 182 | 179.9 | −2.1 |
| Runner pool, runner-minutes a day | 63,754 | 63,008 | −746 (−1.2%) |
| Average concurrent jobs | 44.3 | 43.8 | −0.5 |
| Time to green (median → this run) | 43.5 min | 53.3 min | +9.8 min |
| Runs a day | 350 | 350 | 0 |
Changed jobs: docsite-build changed: standard
Flags: time to green +9.8 min.
Assumptions: before is each job's average over the last 20 pull-request runs; after keeps that for unchanged jobs and uses this run's minutes for added or changed ones, weighted by how often each changed job ran in those runs; runs a day averages the seven whole days before today; time to green compares this run with the median of those runs that ran the same jobs.
Generated by PR Enrichment workflow | View full report
|
(Posted by Cindy's agent.) Thank you for Glass, @beribener, and for the care in the dark data-dense palette! Adding a new built-in theme is a product decision for the Astryx owner, so this is with her now alongside a few other new-option requests. We'll follow up here as soon as there's an answer; no changes are needed from you in the meantime. |
|
Messaged you separately 🙂 |
cixzhang
left a comment
There was a problem hiding this comment.
(Posted by Cindy's agent.) Thank you again for Glass, @beribener. As we said earlier, whether Astryx adds a new built-in theme is a product decision that's with the maintainers, and we'll follow up here when it's made. Meanwhile, here's a quality pass against the theme records, so Glass is ready whichever way that goes; there's no rush.
What's already strong:
- Contrast: secondary text reads at about 6.6–7.9:1 on the body, card and popover surfaces, and text on the accent at about 8.2:1, well above the 4.5:1 the theme-token rules ask for. The status, badge, muted-status and syntax checks pass with Glass.
- Controls: field, checkbox and radio edges reach 3:1, which is the outcome the control-edge rule wants (WCAG 1.4.11).
- Token coverage: every mode-dependent colour is set, so Glass renders the same in light and dark mode.
- Package structure: the package follows the published-theme layout (
.,./built,./theme.css,./fonts.css, standalone with noextends). The CLI template and the native theme regenerate byte for byte.
Two things to change, both about what a person sees:
- Selected and raised cards look like plain cards. The
cardrule (and each hue rule) replaces Card's own shadow and border colour. In Glass, a selectedSelectableCardtherefore looks the same as an unselected one (its record draws the selected state as an inset ring plus a matching border), and Card'selevationhas no visible effect. Someone choosing between selectable cards can't tell which one they picked. Please let the selected ring and elevation come through, for example by layering the glass edge with Card's state shadow instead of replacing it. - Two documented hued-card behaviours don't render. The README and
glass.spec.mdsay a hued card gets a hued border and that focus rings inside it follow the hue. In the built theme, hued cards draw a 0px border and focus rings keep the page accent. Either draw both (a border width in the hue rule, and--focus-outline-colorbeside--color-accent), or drop those claims and the test checks that assert them.
Maintainers will also check the new external links in the README (icon and font sites) as part of their review. Thanks for all the work here!
|
I'll run a full review to re-check this with your note. |
|
Addressed above concerns and committed internally (not here). Should I withdraw this PR? |
|
Reviews run against commits pushed to this PR branch, and the current head here is f42c6b1; changes committed elsewhere are not visible on this PR. Whether to withdraw it is a call for you and the maintainers. |
|
closing; will follow up internally. |
Closes #12240
User need
Teams that build dashboards and other data-dense tools with Astryx want a dark theme made for that job. Every built-in theme today is either general-purpose (Neutral, Stone) or editorial (Gothic, Y2K, Butter). None gives a dashboard what it needs:
Builders get this today only by writing their own theme or by styling each card by hand. Styling by hand breaks theme portability, because the page then names raw colors. Glass is a built-in theme for this case. Pages name only
Cardvariants and tokens, so they render in every other theme too.Problem and solution fit
@astryxdesign/theme-glass, inpackages/themes/glass.<Card variant="<hue>">(blue, cyan, gray, green, orange, pink, purple, red, teal, yellow) tints the card, gives it a hued edge, and sets--color-accent,--color-text-accent, and--color-icon-accentto the hue for its subtree.#6ea8ff, container radius 1.25rem, and categorical data colors that match the card hues.palette.config.json(astryx-oklch-v2, dark-only, exact anchors), the generated ramps and receipt, the selected palette refs, and thegenerate:/check:glass-palette-refsscripts.glass.spec.md, a draft theme record (theme:glass).packages/README.md, CONTRIBUTING (the Storybook theme list),docs/themes/README.md, Storybook (main.ts,preview.tsx), the sandbox (provider, CSS, build deps, a Glass palette page), the docsite dependency list and its CI build step, the Changesetsfixedgroup, rootbuild/check:repo, the CLI theme bundle, the discover list and goldens, the generated Swift theme and its test lists, and the shared first-party contrast tests (scripts/lib/theme-contrast.mjsand the five tests that list themes).No other behavior changes.
Current specification
architecture:theme-authoring-contract,architecture:theme-tokens, andarchitecture:theme-compilationown the token vocabulary,defineTheme, and the theme CSS. Glass uses existing tokens and component targets only.spec:AST-066lets a concrete theme author a sparse set of data tokens. Glass authors the categorical hues,--color-data-neutral, and the data grays.theme:glass(draft, in this PR) records Glass's own mappings and its measured contrast. It needs approval from an engineering or design owner (.github/ENGOWNERS/.github/DESIGNOWNERS). The record and the one-line change topackages/native/specs/swift/library/theme-generator.mdare owner-gated, so this PR waits on that approval.Public delta and caller burden
@astryxdesign/theme-glass, with the same export shape as the other themes:.(source),./built,./theme.css, and./fonts.css. It exportsglassThemeandglassIconRegistry. The generated palette stays private, like Gothic's.astryx theme add glass,theme eject glass, andastryx discoverlist Glass, because the bundle and the discover list are generated frompackages/themes.Theme.glassis generated inpackages/native/apple.Use:
The caller makes two decisions. They pass
mode="dark"for native browser chrome, as the Gothic README already advises. They also load Figtree, or the system font is used.Design and alternatives
extends. No built-in theme extends another, and Gothic's record says it "does not extend another published package theme". Glass carries the Neutral values it shares (typography, motion, radius steps, icons) in its own source. Anextends: neutralThemewould let Neutral's mode-dependent values leak into Glass's single mode.inset 0 0 0 1px). Native platforms draw only inset rings, so a top-edge-only inset would make the Swift generator warn and fall back to Core's shadows. The brighter top edge stays on cards, through the card target.glass.spec.md.cardvariant:<hue>sets--color-accent,--color-text-accent, and--color-icon-accentfor the card's subtree. That makes the charts, progress bars, links, and focus rings inside the card follow the hue. Gothic's card variants already set--color-text-primarythe same way, but the accent is a stronger intent token. If this is not allowed, the fallback is a hued surface that keeps the page accent.--color-border-emphasizedis a light 30% edge, which measures 1.9:1.field,checkbox-indicator, andradio-indicatorraise it to 60% for their subtree, so every field shell, checkbox, and radio box holds 3:1.architecture:theme-tokensINV13 describes--color-border-controlfor this, but Core does not read it yet. If Core reads that token, Glass sets it instead and drops the three overrides.--color-data-categorical-*to its card hues, and sets--color-data-neutraland--color-data-gray-1…5to navy stops, because Core's values for those differ by mode. Gothic's record rejected data overrides for Gothic. Glass does the opposite on purpose, so that charts match the card hues.AppShell. Theapp-shelltarget paints the glows, andlayout-contentis transparent. In the elevated layout with both a top nav and a side nav, the side nav, its layout panel, and the content backdrop paint opaque surfaces, so the glows stay hidden there. They show in content-only and top-nav-only shells (see the screenshot). I did not add overrides forside-navorlayout-panel, because the result is a hard edge at the content backdrop. Is that worth a follow-up, or are the glows fine as they are?@astryxdesign/theme-glassmay need trusted publishing set up (scripts/npm/setup-trusted-publishing.mjs).Evidence
Measured contrast. A hued card is measured at its top-left corner, where its tint is strongest. Translucent layers are composited over their opaque surface. Each floor is asserted in
glassTheme.test.ts.The shared first-party tests also pass with Glass added: badge, muted status, status text, syntax punctuation, secondary selector parity, secondary text, segmented-control labels, and the built-theme media-surface accent test.
Screenshots
These come from the repo's own demo surfaces (the docsite playground and Storybook), rendered in Glass:
The Storybook captures use the system font, because Storybook does not load Figtree. The playground captures use Figtree.
Scope
Components: themes/glass (new); registrations in apps/storybook, apps/sandbox, apps/docsite, packages/cli (bundled templates, discover list, goldens), packages/native (generated Swift theme, test lists), scripts (shared theme contrast tests)
Size:
pnpm review:precounts about 5,400 authored lines, over the 2,000-line guideline. Most of that is the palette receipt, the generated ramps, the CLI template copies thatbundle:cli-themeswrites, and the generated Swift theme. The hand-written theme source is about 430 lines.CI impact:
.github/workflows/ci.ymladds-F @astryxdesign/theme-glassto the existing "Build docsite workspace dependencies" step. That step runs on a standard runner with--workspace-concurrency=4. Expect a few extra seconds for one more theme build in that step, and no new jobs. This is not measured.Testing
pnpm -F @astryxdesign/theme-glass build: theme CSS (nolight-dark()), ESM/CJS, and declarationspnpm vitest run packages/themes/glass scripts/generate-glass-palette-refs.test.mjs: 83 tests, including the palette receipt reproductionpnpm test:node: passes except 20 tests in 8 files (offline-media,theme-cut-short, and thetheme-editapp-copy tests). Those fail the same way on a cleanorigin/maincheckout in the same environment.pnpm check:repo(includingcheck:glass-palette-refs,check:knowledge,check:changesets, andcheck:cli-structure), ESLint atASTRYX_STRICT_LINT=1on every touched file, and Prettiertsc --noEmitfor Storybooknode packages/native/scripts/swift-ios-theme.mjs: no warningspnpm review:pre: 0 findings; merges clean intoorigin/mainpnpm test:ui, and theci:run-visual/ci:run-a11ysuites. Glass is a new theme in the Storybook preview, so the visual gate reports its shots as unbaselined until they are accepted.Writing rubric results
Records touched:
packages/themes/glass/glass.spec.md(new) andpackages/native/specs/swift/library/theme-generator.md(one word added to the published theme list).#followed by digits,/pull/, and/issues/).