Skip to content

LineBoardのレイアウト修正 - #5630

Merged
TinyKitten merged 3 commits into
devfrom
fix/layouts
Mar 22, 2026
Merged

TinyKitten merged 3 commits into
devfrom
fix/layouts

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Mar 22, 2026 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

リリースノート

  • Style

    • 駅名表示の余白計算を調整し、デバイスのサイズに応じたレイアウト最適化を実施
  • Refactor

    • 駅番号の有無に基づいた条件付きスタイル適用を実装
    • 不要な依存関係を削除し、コンポーネントの効率性を改善

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

coderabbitai Bot commented Mar 22, 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: 8c31ff34-8fd4-48ce-b872-a4d54fc8c3d6

📥 Commits

Reviewing files that changed from the base of the PR and between 79311be and ce276f7.

📒 Files selected for processing (7)
  • src/components/LineBoard/shared/components/StationName.tsx
  • src/components/LineBoard/shared/styles/commonStyles.ts
  • src/components/LineBoardJO.tsx
  • src/components/LineBoardJRKyushu.tsx
  • src/components/LineBoardToei.tsx
  • src/components/LineBoardWest.tsx
  • src/components/Transfers.tsx

📝 Walkthrough

Walkthrough

複数のLineBoard関連コンポーネント群の余白・幅計算ロジックを更新し、駅番号の有無に基づいた条件付きスタイル適用を導入しました。また、共有スタイルルールを追加し、不要な駅情報の依存関係を削除しています。

Changes

Cohort / File(s) Summary
基本スタイル計算の調整
src/components/LineBoard/shared/components/StationName.tsx
タブレットブレークポイントのデフォルトmarginBottomをdim.height / 10からdim.height / 8に変更(marginBottomがundefinedの場合のみ)
共有スタイルルール追加
src/components/LineBoard/shared/styles/commonStyles.ts
新しいエクスポート済みスタイルpadLineMarksContainerWestを追加(top: 40、left: -12による絶対配置)
駅番号有無による条件付きスタイル
src/components/LineBoardJRKyushu.tsx, src/components/LineBoardToei.tsx
駅番号が存在するかどうかでmarginBottomまたはwidthを条件付きで計算するメモ化スタイルロジックを実装
PadLineMarks コンテナーのスタイリング
src/components/LineBoardJO.tsx, src/components/LineBoardWest.tsx
駅番号の有無に基づいたtopオフセットの条件付き計算、またはコンテナーのラッピングを追加
依存関係の削除
src/components/Transfers.tsx
駅派生状態(useCurrentStation、useNextStation、stationState)への依存を削除

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 駅番号チェック、スタイルはくるり、
余白と幅は今日も新しく、
条件分岐で美しく整い、
依存削除でコード軽やか、
整えられたボードの完成さ!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed プルリクエストのタイトルは「LineBoardのレイアウト修正」で、変更内容全体を的確に要約しています。複数のコンポーネント(StationName、LineBoard各種、PadLineMarks、Transfers)にわたる一貫性のあるレイアウト関連の修正を簡潔に表現しており、開発者スキャン時に主要な変更内容が明確に伝わります。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 fix/layouts

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

@TinyKitten
TinyKitten merged commit 569afc6 into dev Mar 22, 2026
6 checks passed
@TinyKitten
TinyKitten deleted the fix/layouts branch March 22, 2026 01:23
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