Skip to content

fix(themes): neutral and y2k skeletons show on their light page - #12014

Merged
josephfarina merged 3 commits into
mainfrom
themes-skeleton-visible
Nov 16, 2026
Merged

josephfarina merged 3 commits into
mainfrom
themes-skeleton-visible

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

User impact

Skeleton placeholders were invisible on two official themes' light pages. Neutral's --color-skeleton used the same light stop as its page (#f1f1f1 on #f1f1f1, 1.00:1 at any opacity), and y2k's was 1.11:1 on its lavender page. With this change both themes take a darker neutral stop, so the placeholder reads at Skeleton's pulse peak against the page and every surface.

Problem and solution fit

  • Why does it occur? Each theme's token mapping picked a skeleton stop that matches, or nearly matches, its own light page.
  • Why does it harm the task? A loading state shows nothing, so the page looks empty or broken while it loads.
  • Why does that matter? Skeleton is the loading affordance; an invisible one fails its only job.

Only the token mapping changes (a different palette stop for --color-skeleton); no generated palette value changes, and every palette regenerates byte-for-byte.

Expected behavior and authority

Skeleton pulses its opacity up to 0.925. At that peak a placeholder should read against the page and the surfaces it sits on. Core's own default reads at 1.33:1 (light) and 2.35:1 (dark) by the same measure; each new stop is the one that clears 1.2:1 against every background and is closest to Core's default.

Smallest restoration

Theme (light) Before After Lowest contrast at the pulse peak, before → after
neutral neutral.light[95] #f1f1f1 neutral.light[85] #d4d4d4 1.00:1 (page) → 1.28:1
y2k neutral.light[80] #d1c5b8 neutral.light[75] #c4b8a9 1.11:1 (page) → 1.26:1
  • Dark modes, and butter, chocolate, gothic, matcha and stone in both modes, already clear 1.2:1 and are unchanged.
  • The selected palette refs, the CLI's bundled theme copies and the Swift themes (NeutralTheme.swift, Y2kTheme.swift) are regenerated from the sources (generate:y2k-palette-refs, generate-cli-themes, generate:swift-ios); the Swift output changes only the two skeleton colors.

Evidence

  • New guard scripts/check-skeleton-contrast.test.mjs (resolves tokens with scripts/lib/theme-contrast.mjs and measures with core's contrastRatio, as the other contrast guards do): for every first-party theme, both modes, the skeleton at the pulse peak against --color-background-body, -surface and -card must be at least 1.2:1. Before this change it fails on neutral (page 1.00:1, surfaces 1.12:1) and y2k (page 1.11:1); after, it passes.

Scope

Themes: neutral, y2k

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • vitest run scripts/check-skeleton-contrast.test.mjs scripts/check-theme-template.test.mjs scripts/check-muted-status-contrast.test.mjs packages/themes packages/cli/api/theme/eject: 29 files, 161 tests pass.
  • Every generate:*-palette-refs --check is in sync; prettier and the changeset check pass.

@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 16, 2026 8:06am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 16, 2026
@astracat-bot

astracat-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 16, 2026, 8:26 AM UTC

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · dca376a

Storybook · Sandbox · built from this PR's head

Current run: The current CI run concluded cancelled. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes. The Neutral and Y2K remaps do make Skeleton placeholders visible on both light pages, and two follow-ups are needed before this can merge:

  • The committed Swift themes still carry the old light skeleton (NeutralTheme.swift and Y2kTheme.swift, line 141), so iOS apps keep the invisible placeholder and the required Swift drift test in test-node fails; run pnpm -F @astryxdesign/native generate:swift-ios and commit the result.
  • scripts/check-skeleton-contrast.test.mjs re-implements the token resolver and contrast maths that scripts/lib/theme-contrast.mjs and core's contrastRatio already provide, and already measures slightly differently, so please import those and delete the local copies.

Optional: the CLI changeset could also say that astryx theme edit with a neutral colour now writes the darker skeleton stop.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim, Neutral changeset: the light skeleton takes a darker stop and reads at the pulse peak on the page and every surface. Verified: neutralTheme.ts:168; 1.28:1 on the page, 1.44:1 on surface, card and popover.
  • Claim, Y2K changeset: the same for Y2K. Verified: y2kTheme.ts:231; 1.26:1 on the page, 1.84:1 on surface and card, 1.53:1 on muted.
  • Claim, CLI changeset: themes scaffolded by astryx theme eject take the same stops. Verified: the bundled copies are byte-identical to the packages and the eject tests pass.
  • Claim: Neutral's skeleton matched its page (1.00:1) and Y2K's read 1.11:1. Verified by running the new guard against the base.
  • Claim: only the token mapping changes and every palette regenerates byte-for-byte. Verified: the Neutral and Y2K palette-ref checks are in sync and no palette file changes.
  • Claim: Skeleton pulses up to 0.925 opacity. Verified in Skeleton's keyframes.
  • Claim: Core's default reads 1.33:1 in light and 2.35:1 in dark by the same measure. Verified.
  • Claim: each new stop is the nearest to Core's default that clears 1.2:1. Verified: the next lighter stops give 1.14:1 (Neutral) and 1.11:1 (Y2K).
  • Claim: dark modes and the other five themes already clear 1.2:1 and are unchanged. Verified: the guard flags only Neutral and Y2K light on the base.
  • Claim: the selected refs and the CLI's bundled copies were regenerated from the sources. Verified: regenerating them changes nothing.
  • Claim: the new guard fails before the change and passes after. Verified.
  • Claim: before and after crops show the bars on the page and the card. Consistent with this review's own captures.
  • Claim: the listed test command passes 29 files and 161 tests. Verified.
  • Claim: the palette-ref checks, Prettier and the changeset check pass. Verified for the changed themes, the changed files and all changesets.
  • Claim: no new public API, default or interaction model rides under the fix. Verified: the built API surface of both themes is unchanged.
  • File .changeset/cli-bundled-themes-skeleton-visible.md: clear (optional wording note above).
  • File .changeset/theme-neutral-skeleton-visible.md: clear.
  • File .changeset/theme-y2k-skeleton-visible.md: clear.
  • File packages/cli/assets/templates/themes/neutral/neutralTheme.ts: clear.
  • File packages/cli/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts: clear.
  • File packages/cli/assets/templates/themes/y2k/y2kTheme.ts: clear.
  • File packages/themes/neutral/src/neutralTheme.ts: its Swift theme was not regenerated.
  • File packages/themes/y2k/src/y2kPaletteRefs.generated.ts: clear.
  • File packages/themes/y2k/src/y2kTheme.ts: its Swift theme was not regenerated.
  • File scripts/check-skeleton-contrast.test.mjs: duplicates the shared contrast helpers.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet, because the CI workflow was refused admission while CI was full, so it needs a re-run. Both earlier follow-ups are done: the Swift Neutral and Y2K themes are regenerated, and the skeleton guard now uses the shared contrast helpers.

  • Miss (optional): on Neutral's palette-tinted Cards the skeleton loses its luminance contrast (blue goes from 1.28:1 to 1.00:1 at the pulse peak, so the bars show only by hue, much as Core's own tints sit at 1.03–1.27:1), and one clause in the Neutral changeset would tell users about that trade-off.
  • Optional: the CLI changeset could also say that astryx theme edit with a neutral colour now writes the darker skeleton stop.
Claims and files checked

Review mode: incremental; reason: none

  • Changed rules (0): none since the last review.
  • Claim, Neutral changeset: the light skeleton takes a darker stop and reads at the pulse peak on the page and every surface. Verified: neutralTheme.ts:168; 1.28:1 on the page and muted background, 1.44:1 on surface, card and popover (hue tints are not surfaces; see the note above).
  • Claim, Y2K changeset: the same for Y2K. Verified: y2kTheme.ts:231; 1.26:1 on the page, 1.53:1 muted, 1.84:1 on surface, card and popover.
  • Claim, CLI changeset: themes that astryx theme eject scaffolds take the same stops. Verified: the bundled copies are byte-identical to the packages, rerunning the bundler changes nothing, and the eject tests pass.
  • Claim: Neutral's skeleton matched its page (1.00:1) and Y2K's read 1.11:1. Verified by running the new guard against the base.
  • Claim: only the token mapping changes and every palette regenerates byte-for-byte. Verified: no palette file changes and all six palette-ref checks are in sync.
  • Claim: Skeleton pulses up to 0.925 opacity. Verified in Skeleton's keyframes.
  • Claim: Core's default reads 1.33:1 in light and 2.35:1 in dark by the same measure. Verified.
  • Claim: each new stop is the one nearest Core's default that clears 1.2:1 on page, surface and card. Verified: the next lighter stops give 1.14:1 (Neutral) and 1.11:1 (Y2K), the next darker 1.46:1.
  • Claim: dark modes and the other five themes already clear 1.2:1 and are unchanged. Verified on page, surface and card; the guard flags only Neutral and Y2K light on the base.
  • Claim: the selected refs, the CLI copies and the Swift themes are regenerated, and the Swift output changes only the two skeleton colours. Verified: refs in sync, bundler output unchanged, Swift drift test passes, one line per Swift file.
  • Claim: the new guard uses the shared theme-contrast library and core's contrast measure, fails before the change and passes after. Verified.
  • Claim: before and after crops show the bars on the page and the card. Consistent with this review's own captures.
  • Claim: the listed test command passes 29 files and 161 tests. Verified.
  • Claim: the palette-ref checks, Prettier and the changeset check pass. Verified.
  • Claim: no new public API, default or interaction model rides under the fix. Verified: the built API surfaces of both themes are unchanged.
  • File .changeset/cli-bundled-themes-skeleton-visible.md: clear (optional wording note above).
  • File .changeset/theme-neutral-skeleton-visible.md: clear (optional trade-off note above).
  • File .changeset/theme-y2k-skeleton-visible.md: clear.
  • File packages/cli/assets/templates/themes/neutral/neutralTheme.ts: clear.
  • File packages/cli/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts: clear.
  • File packages/cli/assets/templates/themes/y2k/y2kTheme.ts: clear.
  • File packages/native/apple/Sources/Astryx/Theme/Generated/NeutralTheme.swift: clear.
  • File packages/native/apple/Sources/Astryx/Theme/Generated/Y2kTheme.swift: clear.
  • File packages/themes/neutral/src/neutralTheme.ts: clear.
  • File packages/themes/y2k/src/y2kPaletteRefs.generated.ts: clear.
  • File packages/themes/y2k/src/y2kTheme.ts: clear.
  • File scripts/check-skeleton-contrast.test.mjs: clear.

Automated review (maintainer link)

@josephfarina
josephfarina merged commit ad1fb50 into main Nov 16, 2026
181 of 193 checks passed
@josephfarina
josephfarina deleted the themes-skeleton-visible branch November 16, 2026 09:52

This branch was successfully deployed

1 active deployment
Preview — dca376a4 Deployed Nov 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant