Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop viewer new schedules #292

Merged
merged 49 commits into from Jan 28, 2021
Merged

Stop viewer new schedules #292

merged 49 commits into from Jan 28, 2021

Conversation

binh-dam-ibigroup
Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup commented Dec 15, 2020

This PR fixes #286 and fixes #287 as follows:

  • The schedule view by pattern is replaced with a StopScheduleTable sorted by departures across all patterns.
  • The schedule view scrolls to the first departure from now (it will be underneath the stop viewer header) and highlights it.
  • The underlying API call is changed to use the /date/ OTP endpoint, removing stop times previously included from the previous service day.
  • If stoptime.headsign returned by OTP are blank, they are populated using the pattern description from OTP.
  • Some common routines are refactored in utils/viewer.js, including a new StopTimeCell component used by PatternRow
  • A time zone indicator is shown if user is not in the home timezone config param.

image

Remaining issues

  • getStopTimeFormatted needs to be refactored as a component => working on this next refactored in c7e2368.
  • The code for schedule view remains in PatternRow, will get removed eventiually. => Removed.
  • The scroll zone should probably start just under the stop viewer header. Currently, it hides a portion of the scroll zone (the scrollbars extend all the way to the top... any reason to leave as is right now? => Addressed.

image

@landonreed
Copy link
Member

landonreed commented Dec 16, 2020

One quick comment: for the scrolling, I think we should perhaps have the controls at the top of the stop viewer fixed in place (rather than disappearing when I scroll down the list of arrivals). The table headers should also stay fixed if possible.

Copy link
Member

@landonreed landonreed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking pretty good! I have a few more small changes:

lib/components/viewers/pattern-row.js Outdated Show resolved Hide resolved
lib/util/viewer.js Show resolved Hide resolved
lib/util/viewer.js Outdated Show resolved Hide resolved
lib/util/viewer.js Show resolved Hide resolved
lib/components/viewers/stop-schedule-table.js Outdated Show resolved Hide resolved
lib/components/viewers/stop-viewer.js Outdated Show resolved Hide resolved
lib/components/viewers/stop-viewer.js Outdated Show resolved Hide resolved
@binh-dam-ibigroup
Copy link
Collaborator Author

Ready to review again, hopefully.

example.css Outdated Show resolved Hide resolved
@binh-dam-ibigroup
Copy link
Collaborator Author

Ready to review once more.

@evansiroky evansiroky removed their assignment Jan 27, 2021
# # not begin service again until Monday, we are showing its next
# # departure and it is not entirely excluded from display
# # (defaults to 4 days/345600s if unspecified).
# timeRange: 345600
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding all of this!

@@ -74,6 +74,8 @@ export function getInitialState (userDefinedConfig, initialQuery) {
routingTypes: [],
stopViewer: {
numberOfDepartures: 3, // per pattern
// Hide block ids unless explicitly enabld in config.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: enabld

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, the spellchecker did not catch that @evansiroky!?

Copy link
Member

@landonreed landonreed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just a small typo and merge conflict (probably from the onTimeThresholdSeconds merge).

@binh-dam-ibigroup binh-dam-ibigroup added BLOCKED Blocked (waiting on another PR to be merged) and removed BLOCKED Blocked (waiting on another PR to be merged) labels Jan 28, 2021
@binh-dam-ibigroup binh-dam-ibigroup merged commit 0b4a5c2 into dev Jan 28, 2021
@binh-dam-ibigroup binh-dam-ibigroup deleted the stop-viewer-new-schedules branch January 28, 2021 21:14
@evansiroky evansiroky mentioned this pull request Mar 31, 2021
@github-actions
Copy link
Contributor

🎉 This PR is included in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants