Skip to content

PadArchのレイアウトが機種依存しないように修正#5383

Merged
TinyKitten merged 2 commits intodevfrom
fix/jy-padarch-layout
Feb 20, 2026
Merged

PadArchのレイアウトが機種依存しないように修正#5383
TinyKitten merged 2 commits intodevfrom
fix/jy-padarch-layout

Conversation

@TinyKitten
Copy link
Member

@TinyKitten TinyKitten commented Feb 20, 2026

Summary by CodeRabbit

  • 改善
    • アークに沿った動的なレイアウトを採用し、ドット・駅名・シェブロンの配置と整列精度をさらに向上させました。
    • 表示領域を統一して背景アークと色区分を一貫してレンダリングすることで、色セグメントの描画とレイヤリングが安定しました。
    • マージンやオフセットの調整により、アニメーション面や視覚的間隔の整合性を改善しました。

@TinyKitten TinyKitten self-assigned this Feb 20, 2026
@github-actions github-actions bot added the react label Feb 20, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 20, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

src/components/PadArch.tsxが楕円弧ベースのレイアウトに全面的にリファクタリングされ、弧計算ユーティリティ(弧中心・弧上座標・外向法線)を導入してドット、駅名、シェブロン、カラーセグメントの位置決めと描画を動的に算出するようになりました。

Changes

コホート / ファイル(s) Summary
PadArch コンポーネントの弧ベース再設計
src/components/PadArch.tsx
楕円弧計算ユーティリティ(computeArcEllipse, getArcXAtY, getOutwardNormalX など)と新定数(STROKE_WIDTH等)を追加。ARC_SVG_Y_OFFSET 等の静的オフセットを廃止し、弧ベースで yStart/yEnd を算出。ドット/駅名/シェブロンの配置を弧座標と法線で再計算。背景弧とカラーセグメント描画を arcContainer に統合し、セグメントごとの SVG パス描画とクリッピングを再構成。スタイル・マージン微調整を含む大規模な単一ファイルのロジック置換。

推定コードレビュー工数

🎯 4 (Complex) | ⏱️ ~45分

関連する可能性のあるPR

🐰 弧を描けば道ができる、
点々は跳ねて名前を呼ぶ。
数学で縫った柔らかな線、
静から動へ、座標は歌う。
ぴょんと新しいレイアウトへ ✨

🚥 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 プルリクエストのタイトルは、PadArchコンポーネントのレイアウトを機種依存しないように修正するという主要な変更内容を正確に要約しており、変更内容と一致している。
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 (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/jy-padarch-layout

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/PadArch.tsx`:
- Around line 60-121: computeArcEllipse, getArcXAtY and getOutwardNormalX can
produce NaN when rx or ry (or derived denom) is 0; add small-guard checks: in
computeArcEllipse clamp rawRx/rawRy to a tiny positive epsilon (e.g.
Math.max(rawRx, eps)) and protect the denom/num sqrt by returning a safe
center/radii when denom === 0 (set root = 0 and sign-handling), in getArcXAtY
return cx (or clamp t) if ry is 0 to avoid dividing by zero, and in
getOutwardNormalX handle rx or ry === 0 by returning a safe horizontal normal
(e.g. 1) or computing gx/gy with epsilon-clamped denominators; reference the
functions computeArcEllipse, getArcXAtY, and getOutwardNormalX and ensure all
divisions by rx/ry use the clamped values.

@TinyKitten TinyKitten merged commit 28e2a47 into dev Feb 20, 2026
6 checks passed
@TinyKitten TinyKitten deleted the fix/jy-padarch-layout branch February 20, 2026 20:53
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