Skip to content

設定モーダルのカッコ内テキストを親と同じ色にしタブレットで小さく表示する - #5954

Merged
TinyKitten merged 1 commit into
devfrom
claude/fix-settings-modal-parens-color-size
May 11, 2026
Merged

TinyKitten merged 1 commit into
devfrom
claude/fix-settings-modal-parens-color-size

Conversation

@TinyKitten

@TinyKitten TinyKitten commented May 11, 2026 •

Copy link
Copy Markdown
Member

概要

設定モーダルの列車種別パネル(およびテーマパネル)でカッコ内テキストを描画する際、ネストした Typography が親の色を継承せずデフォルト色 #333 で描画されてしまい、色付きパネル上で本文と異なる黒文字になっていました。あわせてタブレットでサイズ差が視認しにくかったため、タブレット時のフォントサイズも縮小します。

変更の種類

  • バグ修正
  • 新機能
  • リファクタリング
  • ドキュメント
  • CI/CD
  • その他

変更内容

  • src/components/SelectBoundSettingListModal.tsx の renderWithSmallParens に color 引数を追加し、内側の Typography にインラインで色を渡すよう変更。Typography がbaseで color: '#333' を当て直す仕様のため、親色を明示的に再指定しないとカッコ部分のみ黒文字になる問題を解消。
  • 列車種別ボタン・テーマボタン双方の呼び出し側で trainTypeTextColor / themeTextColor を渡すよう更新。
  • trainTypeNameParens の fontSize を RFValue(9) から isTablet ? RFValue(7) : RFValue(9) に変更。タブレットで本文 RFValue(12) ≒24pt に対しカッコが18ptで差が分かりにくかったため、タブレット側のベースを下げて約14ptに(≒58%比率)。スマホ側は従来通り。

テスト

  • npm run lint が通ること
  • npm test が通ること
  • npm run typecheck が通ること

関連Issue

スクリーンショット(任意)


Generated by Claude Code

Summary by CodeRabbit

リリースノート

  • UI改善
    • 列車タイプとテーマの表示で、括弧内のテキストがカラー表示に対応しました
    • タブレット画面でのフォントサイズレスポンスが調整されました

Review Change Stack

@TinyKitten TinyKitten self-assigned this May 11, 2026
@coderabbitai

coderabbitai Bot commented May 11, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fac98a71-e236-4d3f-8e33-44a38a88159a

📥 Commits

Reviewing files that changed from the base of the PR and between 23c38e3 and 3fa1757.

📒 Files selected for processing (1)
  • src/components/SelectBoundSettingListModal.tsx

📝 Walkthrough

概要

SelectBoundSettingListModal コンポーネントの renderWithSmallParens ヘルパー関数を拡張して、括弧で囲まれたテキストセグメントに色を適用できるようにし、列車タイプとテーマラベルで計算された色を使用するよう更新しました。

変更内容

色付き括弧レンダリングの統合

レイヤー / ファイル 概要
ヘルパー関数の色サポート
src/components/SelectBoundSettingListModal.tsx
renderWithSmallParens 関数が color パラメータを受け入れ、Typography スタイルで括弧内のテキストに適用します。
レスポンシブスタイル調整
src/components/SelectBoundSettingListModal.tsx
styles.trainTypeNameParens のフォントサイズが isTablet 値に基づいて動的に設定されます。
列車タイプラベルへの色統合
src/components/SelectBoundSettingListModal.tsx
列車タイプ名が trainTypeTextColor を renderWithSmallParens に渡すよう更新されます。
テーマラベルへの色統合
src/components/SelectBoundSettingListModal.tsx
テーマ名が themeTextColor を renderWithSmallParens に渡すよう更新されます。

関連する PR

  • TrainLCD/MobileApp#5950: renderWithSmallParens ヘルパーと列車タイプ/テーマラベルスタイルを同様に変更しており、関連があります。

推奨ラベル

react

推定レビュー工数

🎯 2 (Simple) | ⏱️ ~12 分

兎からのお祝い詩

🐰 括弧に色を付けて、
画面がより美しく輝く、
helpers は柔軟に、
styles は responsive に、
小さな工夫が大きな喜び ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed タイトルは、カッコ内テキストの色と表示サイズの変更を正確に反映しており、変更内容の主要な部分を簡潔に要約している。
Description check ✅ Passed プルリクエストの説明は、提供されたテンプレートの全ての必須セクション(概要、変更の種類、変更内容、テスト)を適切に記入しており、技術的な詳細と実装理由が明確に述べられている。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/fix-settings-modal-parens-color-size

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

@github-actions github-actions Bot added the react label May 11, 2026
@TinyKitten
TinyKitten merged commit e1f2f2b into dev May 11, 2026
6 checks passed
@TinyKitten
TinyKitten deleted the claude/fix-settings-modal-parens-color-size branch May 11, 2026 17:00
@TinyKitten TinyKitten mentioned this pull request May 11, 2026
4 of 9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants