Repository navigation
feat: 独自テーマをテーマカラーとして作り直す (#1005) - #1019
Merged
Merged
Conversation
4.7 までの独自テーマ 9 つ(美食グリーン / キュアライム・キュアオレンジ / 橙・ダイ 5 色)を、 5.0 のテーマカラーとして tokens/theme/_fork_colors.scss にまとめた。3 ブランチで同一に保ち、 選べる色は各ブランチの config/themes.yml の colors で決める。上流の tokens/index.scss には 読み込みの 4 行(+ @use 1 行)だけを書き足す。 - パレット: 旧テーマのボタン色をアンカーに、上流の lime / pink / orange / cyan に共通する 明度・彩度の推移(OKLCH)を写して生成。600 は白文字とのコントラストを上流と同等(4.4 以上)に補正 - レオナ(正義)はパーソナルカラーの白を主役にした低彩度の色(ダークではボタンがほぼ白になる) - 表示名は config/locales/fork/theme_colors.{ja,en}.yml - bin/rails fork:theme_colors:migrate: 旧テーマの選択(利用者・サイト既定)を同名のテーマカラーへ移す。 既定は確認だけで、EXECUTE=1 で書き込む - spec/fork に配線のガードとタスクの spec を追加 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D3TRP9Atf5BxwybCGQDY72
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
PR の変更ファイル抽出で比較先を --depth=1 で取り直していたため、比較先が進んでいると merge base が無くなり、git diff の失敗が握りつぶされて ESLint / stylelint / RuboCop が skipping になっていた(#1019 で発覚)。浅い取り直しをやめ、比較範囲を解決できないときは落とす。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D3TRP9Atf5BxwybCGQDY72
This was referenced Nov 25, 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.
#1005 の本体。PR #1018(色を選んでいない人にサーバー既定を出す)と対になる。
変更
app/javascript/styles/mastodon/tokens/theme/_fork_colors.scss(新規): 独自 9 色のパレット(50〜950)と、ダーク・ライトそれぞれのdata-theme-colorの定義。3 ブランチで同一に保つtokens/index.scss: 上記を読む@use1 行と@include3 行だけを書き足す(上流との衝突を小さくするため)config/themes.yml: bshockdon はbshockを先頭に、上流の 5 色を残す(先頭がフォールバック先)config/locales/fork/theme_colors.{ja,en}.yml(新規): 9 色の表示名。3 ブランチ共通lib/tasks/fork_theme_colors.rake(新規):bin/rails fork:theme_colors:migrate。旧テーマの選択(利用者・サイト既定)を同名のテーマカラーへ移す。既定は確認だけで、EXECUTE=1で書き込む。何度流しても結果は同じdist/servers/で判定)とタスクの specCI の修正(同梱)
この PR の CI で、RuboCop と stylelint が .rb / .scss を変えているのに skipping になった。PR の変更ファイル抽出で比較先を
--depth=1で取り直していたため、比較先が進んでいる(直前に #1018 をマージした)と merge base が無くなり、git diffの失敗が握りつぶされて変更 0 件と判定されていた。浅い取り直しをやめ、比較範囲を解決できないときは落とすようにした(572f0facda)。修正後は RuboCop・stylelint とも実際に走って通過。⚠ 4.7 系の instance ブランチ(bshockdon / curesta / delmulin)の fork-ci.yml にも同じ問題がある。
色の作り方
確認
spec/fork68 件が手元で通る。rubocop・stylelint ともに指摘 0tokens/index.scssを sass で単体コンパイルし、9 色ぶんのセレクタ(ハイコントラスト含む)が生成されることを確認派生ブランチ
curesta / delmulin へは、マージ後に
config/themes.ymlの colors だけをブランチごとに書き換える(curesta:cure-lime,cure-orange/ delmulin:daidai-orange,dai,popp,maam,hyunckel,leona。いずれも上流の 5 色を後ろに残す)。🤖 Generated with Claude Code
https://claude.ai/code/session_01D3TRP9Atf5BxwybCGQDY72