♻️ refactor: 状態非依存の旧トークンを新セマンティックトークンへ置換(beta / #298 フェーズ2-1) - #300
Merged
Conversation
#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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
This was referenced Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
#298(Figma スタイル刷新 beta)のコンポーネント移行のうち、置換先が一意に決まる(状態を内包しない)トークンだけを先に片付ける PR です。値は据え置きの純粋なリネームなので、見た目は一切変わりません。
feature/298-semantic-tokens-base(🎨 feat: 新セマンティックトークンを生成 CSS に取り込む(beta / #298 フェーズ1) #299 に stack。🎨 feat: 新セマンティックトークンを生成 CSS に取り込む(beta / #298 フェーズ1) #299 を先にマージしてください)置換内容
bg-whitebg-surface-base-0text-text-{high,middle,low,disabled}text-text-neutral-{...}text-text-placeholdertext-text-neutral-lowborder-divider-{low,middle,high}border-border-neutral-{...}ring-[var(--color-ring-normal)]ring-border-ringbg-skeleton-fillbg-surface-base-200bg-[var(--color-black-alpha-300)]bg-surface-overlayテストのアサーションも同じ表で追従させています。
対象外にしたもの(意図的)
primary-500/negative-500のような状態を内包する番号付きトークンは対象外です。Figma が状態のレベルを 1 段ずらしている(旧: 通常 500 / hover 600 → 新: enabled 600 / hover 700)ため、機械置換すると色が変わります。Figma のアノテーションを参照しながら別 PR で行います。検証
--color-border-neutral-low→border-border-neutral-lowのように用途名が重なるが正しい)tsc --noEmitpassRefs: #298 / goodpatch/sparkle-design-internal#247