diff --git a/.changeset/dark-mode-subtle-ink.md b/.changeset/dark-mode-subtle-ink.md new file mode 100644 index 00000000..2bb1c5aa --- /dev/null +++ b/.changeset/dark-mode-subtle-ink.md @@ -0,0 +1,15 @@ +--- +"@cscfi/csc-ui": patch +"@cscfi/csc-ui-react": patch +--- + +Restore the coloured `on-*-subtle` ink in dark mode. + +The dark-mode retune (alpha.8) moved the `on-*-subtle` ink to the near-white +`*-50` step, which turned alert icons and headings white: `c-alert` paints +them with that ink on an alpha wash over the surface, not on the solid +subtle fill. The ink returns to the coloured `*-200` step for every family. +Primary, secondary, info, error and link keep the `*-700` subtle fill; accent, +success and warning go back to `*-800` (hover `*-700`) so the pair still +clears WCAG AA. Every `on-*-subtle / *-subtle` pair passes the strict +contrast audit (4.74:1–6.49:1). diff --git a/.github/workflows/changeset-check.yml b/.github/workflows/changeset-check.yml index f100ba8d..3bce7703 100644 --- a/.github/workflows/changeset-check.yml +++ b/.github/workflows/changeset-check.yml @@ -22,13 +22,23 @@ jobs: with: fetch-depth: 0 - - name: Require a changeset file in the PR + # Only a NEW changeset file counts (--diff-filter=A). Editing an existing + # one does not: once a changeset has been consumed by a "Version + # packages" release it is inert (in pre mode it stays on disk, listed in + # .changeset/pre.json), so a PR that merely amends it releases nothing. + - name: Require a new changeset file in the PR run: | - if git diff --name-only "origin/${{ github.base_ref }}...HEAD" \ + base="origin/${{ github.base_ref }}" + added=$(git diff --name-only --diff-filter=A "$base...HEAD" \ | grep -E '^\.changeset/.+\.md$' \ - | grep -v '^\.changeset/README\.md$'; then - echo "Changeset found." - else - echo "::error::No changeset in this PR. Run 'pnpm changeset' to describe the release impact, or 'pnpm changeset --empty' for a change that should not release." + | grep -v '^\.changeset/README\.md$' || true) + if [ -z "$added" ]; then + if git diff --name-only "$base...HEAD" | grep -qE '^\.changeset/.+\.md$'; then + echo "::error::This PR only edits an existing changeset. A changeset that has already been released (see .changeset/pre.json) is inert — add a new one with 'pnpm changeset' (or 'pnpm changeset --empty' for a change that should not release)." + else + echo "::error::No changeset in this PR. Run 'pnpm changeset' to describe the release impact, or 'pnpm changeset --empty' for a change that should not release." + fi exit 1 fi + echo "New changeset(s):" + echo "$added" diff --git a/CLAUDE.md b/CLAUDE.md index ae370b99..579c029f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -42,7 +42,7 @@ The React package build requires a built `packages/csc-ui` (it reads the manifes Releases are driven by **changesets**, not commit messages: -- Every PR to `main` must include a changeset (`pnpm changeset`); use `pnpm changeset --empty` for changes that must not release. CI blocks PRs without one. +- Every PR to `main` must include a **new** changeset file (`pnpm changeset`); use `pnpm changeset --empty` for changes that must not release. CI blocks PRs without one. Editing an existing changeset does not count: once a "Version packages" PR has consumed it, it is inert (in pre mode it stays on disk, listed in `.changeset/pre.json`), so a follow-up fix always needs its own changeset. - On merge to `main`, `.github/workflows/release.yml` maintains a "Version packages" PR; merging it builds and publishes `@cscfi/csc-ui` + `@cscfi/csc-ui-react` to npm (always the same version — a fixed group). - Publishing uses npm trusted publishing (OIDC); there is no npm token secret. - Never bump versions in `package.json` by hand.