-
Notifications
You must be signed in to change notification settings - Fork 53
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 schedule view input #1021
Fix schedule view input #1021
Conversation
…iever component, action, and re
…ng service time range.
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.
Not sure how crazy I am about using the invisible component instead of baking this into a relevant redux action/graphql query, but it works well and code is clean! Thanks for this fix
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.
I really like this change. I think it's a little confusing from a user perspective. See comment about the timezone alert bug.
If a user enters an invalid date, they should be made aware the request was invalid and the schedule did not update. Or the schedule should disappear, so users do not mistakenly assume the schedule represents the invalid date.
const timezoneCode = formatTz( | ||
isShowingSchedule && date | ||
? parse(date, inputDateFormat, new Date()) | ||
: new Date(), // TODO: mock for percy tests, | ||
'z', | ||
{ |
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.
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.
Good catch! Fixed in 4d1e615.
Good catch, fixed in cc7e503. |
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.
Working really well! Thank Binh, this looks great!
Description
This PR ensures that web requests to get stop times are made only when the user enters a valid date
within the service range available in OTP. Stop times requests when the date is invalid or out of range are no longer made.
Bonus UI: the browser will show the valid dates and sometimes prevent users from entering a date outside the range.
PR Checklist: