バス路線の列車種別を自動選択し長い系統名表示に対応#5992
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 (5)
📝 WalkthroughWalkthrough
Changesバス路線サポート機能の追加
🎯 3 (Moderate) | ⏱️ ~25 minutes
|
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | PR タイトルはバス路線の列車種別自動選択と長い系統名表示対応という本PR の主要な変更内容を明確かつ簡潔に要約しており、開発者視点から重要な変更を適切に反映しています。 |
| Description check | ✅ Passed | PR説明は必須セクション(概要、変更の種類、変更内容、テスト)をすべて記入しており、変更内容の詳細もテンプレートに従って適切に記述されています。テスト項目はすべてチェックされ実施確認済みです。 |
| 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. |
✏️ 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
feature/bus-route-support
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
If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.
Comment @coderabbitai help to get the list of available commands and usage tips.
概要
バス路線で
hasTrainTypes === trueのとき、系統選択を行わなくても先頭の列車種別が自動選択されるようにする。あわせて、バスの系統名は長くなりがちなためCommonCardのタイトル表示を縮小・複数行に対応させる。TrainTypeKindにバス系統用のBusRouteを追加した。変更の種類
変更内容
TrainTypeKindにBusRouteを追加し、シミュレーション速度マップ (TRAIN_TYPE_KIND_MAX_SPEEDS_IN_M_S) にも対応エントリを追加(isBus早期分岐により値自体は実質参照されないためnull)。useLineSelection.handleLineSelectedで、バス路線かつhasTrainTypesの場合に駅側のtrainTypeが無いケースを検出し、fetchedTrainTypes[0]をpendingTrainTypeとして自動選択。続けてfetchStationsByLineGroupIdでその系統の駅一覧を取得しpendingStationsを差し替える。鉄道路線は従来挙動を維持。CommonCardの title 用TypographyにadjustsFontSizeToFitを付与し、isBusLine(line)のときnumberOfLinesを 2 に拡張。長いバス系統名がフォント縮小と 2 行で収まるようにする。useLineSelection.test.tsxにバス自動選択ケースと「鉄道は自動選択しない」ガードケースを追加。テスト
npm run lintが通ることnpm testが通ることnpm run typecheckが通ること関連Issue
スクリーンショット(任意)
Summary by CodeRabbit
リリースノート
New Features
Bug Fixes