Repository navigation
ディズニーリゾートラインを反時計回り一方向の環状線として正式対応 (#6049) - #6050
Conversation
|
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 (10)
📝 WalkthroughWalkthroughThis PR formally adds Disney Resort Line (ID 11345) support as a special loop line with one-way counterclockwise operation. Constants define the line ID and ordered major stations. The ChangesDisney Resort Line Support
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
概要
ディズニーリゾートライン (lineId:
11345) を環状線として正式対応する。実車運行に合わせて反時計回りの一方向のみを経路探索・行先表示の候補とし、時計回り (INBOUND) は選べないようにする。変更の種類
変更内容
DISNEY_RESORT_LINE_ID = 11345をsrc/constants/line.tsに追加DISNEY_RESORT_LINE_MAJOR_STATIONS_IDをsrc/constants/station.tsに追加src/hooks/useLoopLine.tsにisDisneyResortLineを導入し、isLoopLineに組み込み。inboundStationsForLoopLineは常に空配列を返すようにして、SelectBoundModal が時計回りボタンを描画しないようにしたsrc/hooks/useRefreshLeftStations.tsのloopLine判定にディズニーリゾートラインを追加。これにより OUTBOUND 時に通常路線用の逆走ロジックが呼ばれて LineBoard の駅順が反転していた問題を解消key(station.id) が衝突していたuseLoopLineの型に新フィールドが増えたことに伴い、これを mock しているuseBoundText.test.tsx/useCanGoForward.test.tsx/useNextStation.test.tsx/useSlicedStations.test.tsx/useWrongDirectionDetector.test.tsxにisDisneyResortLine: falseを追記useLoopLine.test.tsxにディズニーリゾートライン専用のテストケースを 2 件追加 (環状線として検出されつつ INBOUND が常に空であること、配列末尾の駅を起点にしても環状的に主要駅を取得できること)テスト
npm run lintが通ることnpm testが通ることnpm run typecheckが通ること関連Issue
Closes #6049
スクリーンショット(任意)
Summary by CodeRabbit
リリースノート