Skip to content

iOS向け影設定とelevationをRNのboxShadowとtextShadowに置き換え - #6491

Merged
TinyKitten merged 1 commit into
devfrom
feature/migrate-shadow-to-box-shadow
Jul 30, 2026
Merged

TinyKitten merged 1 commit into
devfrom
feature/migrate-shadow-to-box-shadow

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Jul 30, 2026 •

Copy link
Copy Markdown
Member

概要

iOS専用の shadow* プロパティと Android の elevation で二重管理していた影の実装を、React Native 0.76+ の boxShadow(テキストのグリフ影は textShadow*)に統一しました。影の見た目は従来の iOS の描画を基準とし、Android は elevation の廃止により iOS と同じデザインに追従します。

変更の種類

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

変更内容

  • shadowColor / shadowOpacity / shadowRadius / shadowOffset / elevation を boxShadow に置き換え(blur は CSS 仕様との等価変換で shadowRadius × 2、色は shadowColor と shadowOpacity を rgba() に合成。RN のパーサ仕様に合わせ数値には px を明記)
  • テキストのグリフ影(TrainTypeBox / TrainTypeBoxSaikyo / TypeChangeNotify)は boxShadow だと矩形影になるため、クロスプラットフォームの textShadow* に置き換え。shadowOffset 未指定時に適用されていた iOS 既定値 (0, -3) は明示して踏襲
  • FAB の動的 shadowColor(LEDテーマ時は影なし)を boxShadow 文字列を返す useMemo に変更
  • タブレット時のモーダル影の上書き(SelectBoundModal / SelectBoundSettingListModal)は、プロパティ単位のマージで CustomModal から継承していた offset / radius を合成済みの boxShadow 値として明示
  • RouteInfoModal の expandableToggle の影打ち消し(elevation: 0 + shadowOpacity: 0)を boxShadow: [] に変更
  • 従来 iOS では描画されていなかった影を削除: NowHeader / SettingsHeader(overflow: 'hidden' によりクリップ)、HeaderEast tyConfig の gradientRootExtraStyle(同上)、HeaderJRKyushu の divider(elevation のみで iOS に影なし)

テスト

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

関連Issue

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

Summary by CodeRabbit

  • Style
    • ボタン、カード、モーダル、ヘッダーなどの影の表示方法を統一し、より一貫した見た目に改善しました。
    • テキストの影を調整し、各プラットフォームでの表示差を軽減しました。
    • 一部のテーマや画面では不要な影を適切に無効化しました。

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

coderabbitai Bot commented Jul 30, 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: a749735f-0881-4ea6-82bb-91fa3de27990

📥 Commits

Reviewing files that changed from the base of the PR and between b4aee69 and c5cd954.

📒 Files selected for processing (27)
  • src/components/Button.tsx
  • src/components/CommonCard.tsx
  • src/components/CustomModal.tsx
  • src/components/DevOverlay.tsx
  • src/components/FAB.tsx
  • src/components/FooterTabBar.tsx
  • src/components/HeaderEast/config.ts
  • src/components/HeaderJRKyushu.tsx
  • src/components/NoPresetsCard.tsx
  • src/components/NowHeader.tsx
  • src/components/PresetCard.tsx
  • src/components/RouteInfoModal.tsx
  • src/components/SearchBar.tsx
  • src/components/SelectBoundModal.tsx
  • src/components/SelectBoundSettingListModal.tsx
  • src/components/SettingsHeader.tsx
  • src/components/ThemeConfirmModal.tsx
  • src/components/ToggleButton.tsx
  • src/components/TrainTypeBox.tsx
  • src/components/TrainTypeBoxJL.tsx
  • src/components/TrainTypeBoxSaikyo.tsx
  • src/components/TypeChangeNotify.tsx
  • src/components/WalkthroughOverlay.tsx
  • src/screens/DestinationAgent/AgentEntryBanner.tsx
  • src/screens/DestinationAgent/AgentInputBar.tsx
  • src/screens/DestinationAgent/AgentMessageBubble.tsx
  • src/screens/DestinationAgent/AgentTypingIndicator.tsx
💤 Files with no reviewable changes (2)
  • src/components/SettingsHeader.tsx
  • src/components/NowHeader.tsx

📝 Walkthrough

Walkthrough

各コンポーネントの shadow* と elevation を boxShadow に統一し、テキスト影は textShadow 系へ移行しました。FABではテーマに応じた影指定を追加しています。

Changes

シャドウスタイル移行

Layer / File(s) Summary
共通サーフェスの影スタイル
src/components/Button.tsx, CommonCard.tsx, FooterTabBar.tsx, HeaderEast/config.ts, HeaderJRKyushu.tsx, NoPresetsCard.tsx, PresetCard.tsx, SearchBar.tsx, ToggleButton.tsx, TrainTypeBoxJL.tsx
ボタン、カード、ヘッダー、検索バーなどの影指定を、個別の shadow* / elevation から boxShadow へ置き換えています。
モーダルとオーバーレイの影スタイル
src/components/CustomModal.tsx, DevOverlay.tsx, NowHeader.tsx, RouteInfoModal.tsx, SelectBoundModal.tsx, SelectBoundSettingListModal.tsx, SettingsHeader.tsx, ThemeConfirmModal.tsx, WalkthroughOverlay.tsx
モーダル、ヘッダー、ツールチップなどの影指定を更新し、影を無効化する箇所では boxShadow または透明な指定を使用しています。
テキスト影の指定移行
src/components/TrainTypeBox.tsx, TrainTypeBoxSaikyo.tsx, TypeChangeNotify.tsx
テキストの影を textShadowColor、textShadowOffset、textShadowRadius で指定し、無効化箇所を textShadowColor: 'transparent' に変更しています。
FABとDestinationAgentの影スタイル
src/components/FAB.tsx, src/screens/DestinationAgent/*
FABではLEDテーマ時の影を undefined とし、それ以外では boxShadow を設定しています。DestinationAgentの各背景・吹き出し・入力バーの影も boxShadow に置き換えています。

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

Possibly related PRs

  • TrainLCD/MobileApp#6479: DestinationAgent各コンポーネントの影スタイル変更と同じコード領域に関連します。

Poem

ぴょんと跳ねれば影もひとつ
boxShadowで月明かり
文字の影は静かに揃い
LEDの夜は影を消す
うさぎも満足、すっきり画面 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 主要な変更点である影設定のboxShadow/textShadowへの置き換えを端的に表しています。
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.
✨ 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 feature/migrate-shadow-to-box-shadow

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

@TinyKitten
TinyKitten merged commit dbeaf43 into dev Jul 30, 2026
6 checks passed
@TinyKitten
TinyKitten deleted the feature/migrate-shadow-to-box-shadow branch July 30, 2026 21:41
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