-
Notifications
You must be signed in to change notification settings - Fork 96
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
fix: time related issues in the "map by line" page #936
fix: time related issues in the "map by line" page #936
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you very much.
Consider adding tests or adding an issue describing the test cases that would cover this bug to prevent future regressions
@@ -35,17 +37,45 @@ export const useSingleLineData = (lineRef?: number, routeIds?: number[]) => { | |||
return pos | |||
}, [locations]) | |||
|
|||
function convertTo24HourAndToNumber(time: string): number { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name does not reflect that the output of this method is the number of minutes since midnight. Would you consider renaming this method?
This is my suggestion, but feel free to implement anything you like.
function convertTo24HourAndToNumber(time: string): number { | |
function timestringToMinutes(time: string): number { |
@TomRytt Thanks for making this effort, I'm not really sure where this PR stands. Can I merge it? Thank you very much |
Replying here so it is also documented as we resolved this face to face. After speaking I merged this PR but I am getting notifications that the Pipeline fails, I need to investigate it later today, might require assistance, I'll let you know if I do. |
Thanks! It's failing because of a test that we should fix - |
Description
Fixes #902.
Fixes the following issues:
Optimizations:
screenshots
Taken at 22:58 (two minutes before the next bus is scheduled)
Taken at 23:00 (after the bus is scheduled)