feat(ServicePatterns): separate (no school) services - #3446
Merged
Conversation
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.
Scope
Asana Ticket: 🛜 🐞 Daily Schedules sometimes doesn't show school trips
Implementation
The current code merges together typical services to show a clean dropdown menu.
The typical services can encompass service across multiple route patterns, some of those which aren't typical. One example is 37-B-1, which powers our very occasional school trips on the 37 (typicality of 3). This also has not concept of which stops are actually being served or not - services relate to routes, and route patterns further describe how stops along the route are (or are not) served at a given time.
Anyway, our code was combining
Monday - Thursday schedules (no school)intoMonday - Thursday schedulesbut the underlying datepicker picks the next valid service date, which across the combined services is today (well, yesterday), which isn't actually served at our school-trip-only stops (yet!). Altogether creating a confusing experience.Because of its behavior in selecting dates which don't have a school trip, it can't show said trip.
The quickest way to resolve this is to stop letting the
"(no school)"services get merged into the otherwise identical school version of the service, and show them both separately to avoid ambiguity.Screenshots
Before | After
How to test
Try it on your favorite routes!
Note - unfortunately, there's still bugs with respect to showing the entire school trip! The aforementioned example doesn't show stops from Forest Hills to Avenue Louis Pasteur. This'll hopefully be resolved in a future PR.