Skip to content

♻️ refactor: 状態非依存の旧トークンを新セマンティックトークンへ置換(beta / #298 フェーズ2-1) - #300

Merged
touyou merged 1 commit into
mainfrom
feature/298-token-rename-stateless
Aug 17, 2026
Merged

♻️ refactor: 状態非依存の旧トークンを新セマンティックトークンへ置換(beta / #298 フェーズ2-1)#300
touyou merged 1 commit into
mainfrom
feature/298-token-rename-stateless

Conversation

@touyou

@touyou touyou commented Aug 17, 2026

Copy link
Copy Markdown
Member

概要

#298(Figma スタイル刷新 beta)のコンポーネント移行のうち、置換先が一意に決まる(状態を内包しない)トークンだけを先に片付ける PR です。値は据え置きの純粋なリネームなので、見た目は一切変わりません

置換内容

bg-white bg-surface-base-0
text-text-{high,middle,low,disabled} text-text-neutral-{...}
text-text-placeholder text-text-neutral-low
border-divider-{low,middle,high} border-border-neutral-{...}
ring-[var(--color-ring-normal)] ring-border-ring
bg-skeleton-fill bg-surface-base-200
bg-[var(--color-black-alpha-300)] bg-surface-overlay

テストのアサーションも同じ表で追従させています。

対象外にしたもの(意図的)

primary-500 / negative-500 のような状態を内包する番号付きトークンは対象外です。Figma が状態のレベルを 1 段ずらしている(旧: 通常 500 / hover 600 → 新: enabled 600 / hover 700)ため、機械置換すると色が変わります。Figma のアノテーションを参照しながら別 PR で行います。

検証

  • 新旧トークンの解決値を全 12 ペア突き合わせて完全一致を確認(見た目の変化なし)
  • ユーティリティ名は tailwindcss 4.3.2 を実際にコンパイルして生成を確認(--color-border-neutral-lowborder-border-neutral-low のように用途名が重なるが正しい)
  • tsc --noEmit pass
  • テスト 611 passed / 10 skipped / 19 todo

Refs: #298 / goodpatch/sparkle-design-internal#247

#298 のコンポーネント移行のうち、**置換先が一意に決まる
(状態を内包しない)トークンだけ**を先に片付ける。値は据え置きの純粋なリネームで、
見た目は一切変わらない。

置換内容(#298 の置換表どおり):

- `bg-white` → `bg-surface-base-0`
- `text-text-{high,middle,low,disabled}` → `text-text-neutral-{...}`
- `text-text-placeholder` → `text-text-neutral-low`
- `border-divider-{low,middle,high}` → `border-border-neutral-{...}`
- `ring-[var(--color-ring-normal)]` → `ring-border-ring`
- `bg-skeleton-fill` → `bg-surface-base-200`
- `bg-[var(--color-black-alpha-300)]` → `bg-surface-overlay`

実装 22 ファイル・テスト 10 ファイル。テストのアサーションも同じ表で追従させた。

`primary-500` / `negative-500` のような**状態を内包する番号付きトークンは対象外**。
Figma が状態のレベルを 1 段ずらしている(旧: 通常 500 / hover 600 → 新: enabled 600 /
hover 700)ため機械置換すると色が変わる。Figma のアノテーションを参照しながら別 PR で行う。

検証:
- 新旧トークンの解決値を全 12 ペア突き合わせ、**すべて一致**することを確認(見た目の変化なし)
- ユーティリティ名は tailwindcss 4.3.2 を実際にコンパイルして生成を確認
  (`--color-border-neutral-low` → `border-border-neutral-low` のように用途名が重なる)
- `tsc --noEmit` pass / テスト 611 passed・10 skipped・19 todo

Refs: #298 / goodpatch/sparkle-design-internal#247

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PvBqPVxAQ81HZVELDPBhcF
@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
sparkle-design Ready Ready Preview Aug 17, 2026 2:10am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 404a87c3-8c38-4494-9ef5-262f8e8c04e7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

Base automatically changed from feature/298-semantic-tokens-base to main August 17, 2026 03:46
@touyou
touyou merged commit 4e931d9 into main Aug 17, 2026
5 checks passed
@touyou
touyou deleted the feature/298-token-rename-stateless branch August 17, 2026 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant