Skip to content

Add Bus Widget Modal - #57

Open
kathryntanardy wants to merge 12 commits into
masterfrom
fix_40_hidden-dropdown-bus-widget
Open

Add Bus Widget Modal#57
kathryntanardy wants to merge 12 commits into
masterfrom
fix_40_hidden-dropdown-bus-widget

Conversation

@kathryntanardy

Copy link
Copy Markdown
Contributor

Fixes for replacing the hidden dropdown in the bus schedule widget with a full modal view. The bus widget still shows the next departure on the main screen. When a route is clicked, it now opens a modal with the next departure and the upcoming departures for that route.

Changes:

  • Added a new bus schedule modal for route details and upcoming departures.
  • Updated the shared modal system so modals can change layout options like padding, height, and title visibility.
  • Added color styling for on-time, delayed, early, arrived, and cancelled buses.

@jbriones1 jbriones1 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.

Looks really good! The modal is currently not reactive i.e. its time will drift versus the display, but that will be fixed later, since it's a bigger change.

Image

@jbriones1 jbriones1 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.

One more nitpick

export class BusDepartureCardComponent {
readonly departure = input.required<DepartureInfo>();

readonly delaySeconds = input.required<number>();

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.

Can probably just infer this from the departure object and reduce the number of inputs down to 1. Not sure if I'm missing something, but when it's used in the template you just supply departure.delaySeconds anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants