バス運行情報の遅延見込み・運休表示を追加#540
Draft
kantacky wants to merge 7 commits into
Draft
Conversation
BusTrip に nullable な delayMinutes を追加し、バス画面のリストタイルで `N分遅延見込み` を表示する。データソースは未接続で、null のときは非表示。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
遅延表示 UI の確認用に、delayMinutes のデータソースが決まるまでの 仮値を BusTrip.fromFirebase 内で生成するようにした。dart:math の Random で呼び出しごとに 0〜8 の一様乱数を返し、TODO コメントで 本実装で差し替える場所を明示している。振る舞いは遅延表示の モック化のみで、既存の便データ構築ロジックには手を入れていない。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
遅延見込みと並んで運休状態も扱えるよう、BusTrip に `isCancelled` フィールドとモック用ヘルパーを追加した。 データソースが未確定のため、`fromFirebase` では約10本に1本を 運休扱いとするダミー生成を行い、運休時は遅延分数を null にする。
BusTrip.isCancelled に対応し、運休便のタイルでは 発着時刻を取り消し線と弱色で表示し、遅延見込みの代わりに 赤色の「運休」バッジを表示する。運休便および route == '0' の ダミー便はタップによる詳細遷移も無効化する。
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.
案件: バス運行情報の遅延・運休表示
やったこと
BusTripに遅延見込み分数 (delayMinutes) と運休フラグ (isCancelled) を追加BusTrip.fromFirebaseに 0〜8 分の遅延と 10% の運休を再現するダミーデータ注入処理を追加(データソース決定までの仮置き)確認したこと