Skip to content

路線切替モーダルに切替先の路線記号を表示 - #6556

Merged
TinyKitten merged 1 commit into
devfrom
fix/line-switch-dialog-symbol
Aug 6, 2026
Merged

TinyKitten merged 1 commit into
devfrom
fix/line-switch-dialog-symbol

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Aug 6, 2026 •

Copy link
Copy Markdown
Member

概要

路線切替確認モーダルの左上表示を、汎用の情報絵文字から切替先の路線記号へ変更します。路線記号画像がアプリに登録されていない路線では、切替先のラインカラーを使ったグラデーション正方形を表示します。

変更の種類

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

変更内容

  • 路線切替時に getLineSymbolImage から切替先の路線記号画像を取得してダイアログへ渡すよう変更
  • 路線記号画像がない場合、テーマ確認モーダルと同じ配色ロジック(ラインカラーから10%明るくした色へのグラデーション)でフォールバック
  • 路線記号画像/グラデーションを使わない既存ダイアログでは従来の絵文字表示を維持
  • 路線記号画像あり/なしの双方をユニットテストで検証

テスト

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

全体テスト: 207 suites / 2192 tests passed。
commit前・push前にも関連13テストとlintを再実行済みです。

関連Issue

なし

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

未添付(実機スクリーンショットを取得できる環境がないため)。

Summary by CodeRabbit

  • 新機能
    • 乗換駅などの確認ダイアログに、路線記号画像を表示できるようになりました。
    • 路線記号画像がない場合は、路線カラーのグラデーションで表示します。
    • 選択した路線名と路線記号がダイアログに正しく反映されます。
  • 改善
    • 路線記号が指定されていない場合は、従来どおり絵文字を表示します。

@github-actions github-actions Bot added the react label Aug 6, 2026
@TinyKitten TinyKitten self-assigned this Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

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: f960e442-d91a-4034-aecf-bd892d360349

📥 Commits

Reviewing files that changed from the base of the PR and between 864222f and 6923f82.

📒 Files selected for processing (5)
  • src/components/CommonDialogModal.test.tsx
  • src/components/CommonDialogModal.tsx
  • src/components/CommonDialogPresenter.tsx
  • src/screens/Main.tsx
  • src/utils/dialogPresentation.ts

📝 Walkthrough

Walkthrough

DialogOptions に路線記号設定を追加しました。CommonDialogModal は画像または色付きグラデーションを表示します。Main は対象路線の記号情報を確認ダイアログへ渡します。画像表示とグラデーション表示のテストを追加しました。

Changes

路線記号付きダイアログ

Layer / File(s) Summary
路線記号の型定義と表示
src/utils/dialogPresentation.ts, src/components/CommonDialogModal.tsx, src/components/CommonDialogModal.test.tsx
DialogOptions に lineSymbol を追加しました。CommonDialogModal は画像を優先し、画像がない場合は色付きグラデーションを表示します。どちらもない場合は絵文字を表示します。表示条件をテストで検証します。
ダイアログ設定の引き渡し
src/components/CommonDialogPresenter.tsx
リクエストの lineSymbol を CommonDialogModal に渡します。
乗換確認ダイアログへの適用
src/screens/Main.tsx
対象路線を targetLine として扱い、路線名、路線記号画像、路線色を確認ダイアログへ渡します。

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Sequence Diagram(s)

sequenceDiagram
  participant Main
  participant CommonDialogPresenter
  participant CommonDialogModal
  Main->>CommonDialogPresenter: 対象路線と lineSymbol を含む確認要求
  CommonDialogPresenter->>CommonDialogModal: lineSymbol を props に渡す
  CommonDialogModal->>CommonDialogModal: 画像またはグラデーションを選択して表示
Loading

Poem

うさぎが跳ねて、記号が光る
画像があれば、絵文字は眠る
色があれば、グラデーション
ダイアログに路線が走る
ぴょんと確認、表示完了! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 路線切替モーダルに切替先の路線記号を表示するという主な変更内容を、簡潔かつ明確に示しています。
Description check ✅ Passed 概要、変更種類、変更内容、テスト、関連Issue、スクリーンショットの各項目を記載し、変更と検証結果を具体的に説明しています。
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.
✨ 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 fix/line-switch-dialog-symbol

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

@TinyKitten
TinyKitten merged commit a5e308c into dev Aug 6, 2026
6 checks passed
@TinyKitten
TinyKitten deleted the fix/line-switch-dialog-symbol branch August 6, 2026 02:21
@TinyKitten TinyKitten mentioned this pull request Aug 6, 2026
4 of 9 tasks
TinyKitten added a commit that referenced this pull request Aug 6, 2026
* 路線切替モーダルに切替先の路線記号を表示 (#6556)

* Bump version for canary release (#6558)

Co-authored-by: TinyKitten <[email protected]>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
TinyKitten added a commit that referenced this pull request Aug 6, 2026
* 路線切替モーダルに切替先の路線記号を表示 (#6556)

* Bump version for canary release (#6558)



---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude <[email protected]>
TinyKitten added a commit that referenced this pull request Aug 6, 2026
* 路線切替モーダルに切替先の路線記号を表示 (#6556)

* Bump version for canary release (#6558)



---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude <[email protected]>
@TinyKitten TinyKitten mentioned this pull request Aug 8, 2026
5 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.

1 participant