Skip to content

ウォークスルーの切り抜き角丸を対象要素の形に合わせて修正 - #6678

Merged
TinyKitten merged 4 commits into
devfrom
claude/settings-onboarding-corner-radius-xwhhis
Aug 12, 2026
Merged

TinyKitten merged 4 commits into
devfrom
claude/settings-onboarding-corner-radius-xwhhis

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

概要

ウォークスルー(オンボーディング)のスポットライト切り抜きに 3 つの角丸不整合があったため修正しました。設定画面で TTS のステップだけ角丸なしになっていた不具合を起点に、LED テーマで角丸が残っていた問題と、対象要素の形に追従できていなかった問題まで併せて解消しています。

変更の種類

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

変更内容

  • 設定画面のウォークスルーで、TTS のステップだけ borderRadius: 0 となり切り抜きが角丸にならなかった不具合を修正。半径を SPOTLIGHT_BORDER_RADIUS として定数化し、テーマ・TTS・表示言語の 3 ステップで統一した(src/screens/AppSettings.tsx)。
  • LED テーマでは角丸を使わないルールに合わせ、WalkthroughOverlay 側で切り抜き・ツールチップカード・「次へ」ボタン・ページネーションのドットをすべて直角化。全ウォークスルー(設定・路線選択・経路検索)に一括で適用され、今後追加されるステップにも自動で効く。
  • スポットライトを隅ごとの角丸に対応(borderTopLeftRadius などを SpotlightArea に追加)。SVG の <Rect rx ry> は 4 隅共通の半径しか表現できないため、マスクの描画を <Path> に変更した。隅ごとの指定がない隅は従来どおり borderRadius にフォールバックするため、既存の呼び出し箇所は変更不要。
  • 隅ごとに半径の異なる角丸矩形の SVG パスを生成する buildRoundedRectPath を追加(src/utils/roundedRectPath.ts)。短辺の半分での頭打ち、負値・サイズ 0 の防御込み。
  • 路線選択の changeLocation ステップを NowHeader カードの実形状(上辺 0 / 下辺 16)に合わせた(src/hooks/useSelectLineWalkthrough.ts)。

補足: 領域全体を囲む 3 ステップ(路線一覧・プリセット・検索結果)は単一の対象形状が存在しないため既存の半径のままです。検索バー・AI バナー・フッターボタンは元から実形状と一致していたため変更していません。

リグレッションリスクと緩和策

  • 切り抜きの描画方法を <Rect> から <Path> へ変更しているため、全ウォークスルーの表示に影響します。パス生成は純粋関数として切り出し、単体テスト 6 件(通常・隅ごと・全隅0・頭打ち・負値・サイズ0)でカバーしました。
  • SpotlightArea の変更は追加プロパティのみで、既存の borderRadius 指定はフォールバックとして従来どおり機能します(型・呼び出し箇所の互換性は npm run typecheck で確認)。
  • LED テーマの直角化は WalkthroughOverlay の 1 箇所に集約したため、画面ごとの実装漏れが起きない構造にしています。

テスト

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

実行コマンドと結果:

  • npm run lint → 635 ファイル、指摘なし
  • npm run typecheck → エラーなし
  • npm test → 221 suites / 2324 tests すべて成功

追加・更新したテスト:

  • src/utils/roundedRectPath.test.ts(新規 6 件)
  • src/components/WalkthroughOverlay.test.tsx(新規 6 件。通常テーマ / LED / 隅ごと指定 / フォールバック / LED × 隅ごと指定 / ツールチップの角丸)
  • src/screens/AppSettings.test.tsx(新規 2 件。全ステップで切り抜き半径が同一になること)
  • src/hooks/useSelectLineWalkthrough.test.tsx(既存アサーションを NowHeader の実形状に更新)

関連Issue

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

実行環境にシミュレータ・エミュレータが無いため未取得です。UI 変更を含むため、レビュー前に実機またはシミュレータでの確認をお願いします。


Generated by Claude Code

Summary by CodeRabbit

  • 改善
    • ウォークスルーのスポットライトで、四隅ごとに角丸を調整できるようになりました。
    • 設定画面では、テーマ・音声読み上げ・言語項目を統一した角丸で強調します。
    • ヘッダーなど一部の案内では、上辺を直角、下辺のみ角丸にして対象範囲を正確に示します。
    • LEDテーマでは、スポットライトやツールチップの角丸をなくし、シャープな表示に変更しました。

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

coderabbitai Bot commented Aug 12, 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: 277f90f7-f98a-4514-bec2-83ecb3eaed46

📥 Commits

Reviewing files that changed from the base of the PR and between 8bd466d and a4fa9f6.

📒 Files selected for processing (1)
  • src/components/WalkthroughOverlay.test.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/WalkthroughOverlay.test.tsx

📝 Walkthrough

Walkthrough

WalkthroughOverlay が四隅ごとの角丸とLEDテーマの直角表示に対応しました。SVGパス生成ユーティリティを追加しました。ウォークスルー定義を更新し、関連するテストを追加しました。

Changes

ウォークスルー角丸対応

Layer / File(s) Summary
角丸SVGパス生成
src/utils/roundedRectPath.ts, src/utils/roundedRectPath.test.ts
buildRoundedRectPath と RoundedRectPathParams を追加しました。四隅の半径を正規化し、上限を適用してSVGパスを生成します。
オーバーレイ表示とテーマ処理
src/components/WalkthroughOverlay.tsx, src/components/WalkthroughOverlay.test.tsx
スポットライトが共通半径と四隅個別半径を処理します。LEDテーマではスポットライト、ツールチップ、ページネーション、次へボタンを直角で表示します。
ウォークスルー定義と画面検証
src/hooks/useSelectLineWalkthrough.ts, src/hooks/useSelectLineWalkthrough.test.tsx, src/screens/AppSettings.tsx, src/screens/AppSettings.test.tsx
NowHeader と changeLocation の上辺・下辺の角丸を個別指定に変更しました。設定画面のスポットライト半径を共通定数で管理し、対象ステップを検証します。

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

Sequence Diagram(s)

sequenceDiagram
  participant WalkthroughOverlay
  participant ThemeAtom
  participant buildRoundedRectPath
  participant SVGMask
  WalkthroughOverlay->>ThemeAtom: LEDテーマ状態を取得する
  ThemeAtom-->>WalkthroughOverlay: テーマ状態を返す
  WalkthroughOverlay->>buildRoundedRectPath: 矩形と角丸半径を渡す
  buildRoundedRectPath-->>WalkthroughOverlay: SVGパスを返す
  WalkthroughOverlay->>SVGMask: スポットライトパスを描画する
Loading

Poem

うさぎが角丸を数えます
左上、右上、下も確認します
LEDなら角をまっすぐにします
パスが光をきれいに抜きます
ぴょん、とテストも通ります 🐇

🚥 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 claude/settings-onboarding-corner-radius-xwhhis

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/WalkthroughOverlay.test.tsx`:
- Around line 71-81:
追加されたデフォルト角丸契約を検証するテストをWalkthroughOverlayのテストスイートに追加してください。borderRadiusおよび各隅の半径を省略したspotlightAreaをrenderOverlayへ渡し、getSpotlightPathの結果が全隅8pxのbuildRoundedRectPathと一致することを確認してください。
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7ae32f13-9d17-4bd4-b161-07fba413f870

📥 Commits

Reviewing files that changed from the base of the PR and between 2483a5b and 8bd466d.

📒 Files selected for processing (8)
  • src/components/WalkthroughOverlay.test.tsx
  • src/components/WalkthroughOverlay.tsx
  • src/hooks/useSelectLineWalkthrough.test.tsx
  • src/hooks/useSelectLineWalkthrough.ts
  • src/screens/AppSettings.test.tsx
  • src/screens/AppSettings.tsx
  • src/utils/roundedRectPath.test.ts
  • src/utils/roundedRectPath.ts

@TinyKitten
TinyKitten merged commit ee0d57a into dev Aug 12, 2026
5 checks passed
@TinyKitten
TinyKitten deleted the claude/settings-onboarding-corner-radius-xwhhis branch August 12, 2026 13:24
This was referenced Aug 12, 2026
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