Repository navigation
ウォークスルーの切り抜き角丸を対象要素の形に合わせて修正 - #6678
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_014Ld3Fk2RBtbRNa4BaNqAXV
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_014Ld3Fk2RBtbRNa4BaNqAXV
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_014Ld3Fk2RBtbRNa4BaNqAXV
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthrough
Changesウォークスルー角丸対応
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: スポットライトパスを描画する
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Contributor
There was a problem hiding this comment.
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
📒 Files selected for processing (8)
src/components/WalkthroughOverlay.test.tsxsrc/components/WalkthroughOverlay.tsxsrc/hooks/useSelectLineWalkthrough.test.tsxsrc/hooks/useSelectLineWalkthrough.tssrc/screens/AppSettings.test.tsxsrc/screens/AppSettings.tsxsrc/utils/roundedRectPath.test.tssrc/utils/roundedRectPath.ts
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_014Ld3Fk2RBtbRNa4BaNqAXV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
ウォークスルー(オンボーディング)のスポットライト切り抜きに 3 つの角丸不整合があったため修正しました。設定画面で TTS のステップだけ角丸なしになっていた不具合を起点に、LED テーマで角丸が残っていた問題と、対象要素の形に追従できていなかった問題まで併せて解消しています。
変更の種類
変更内容
borderRadius: 0となり切り抜きが角丸にならなかった不具合を修正。半径をSPOTLIGHT_BORDER_RADIUSとして定数化し、テーマ・TTS・表示言語の 3 ステップで統一した(src/screens/AppSettings.tsx)。WalkthroughOverlay側で切り抜き・ツールチップカード・「次へ」ボタン・ページネーションのドットをすべて直角化。全ウォークスルー(設定・路線選択・経路検索)に一括で適用され、今後追加されるステップにも自動で効く。borderTopLeftRadiusなどをSpotlightAreaに追加)。SVG の<Rect rx ry>は 4 隅共通の半径しか表現できないため、マスクの描画を<Path>に変更した。隅ごとの指定がない隅は従来どおりborderRadiusにフォールバックするため、既存の呼び出し箇所は変更不要。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で確認)。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