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

add date-time option for easy testing conditional-turn-restriction #200

Merged
merged 9 commits into from
Jan 30, 2024

Conversation

nvcnvn
Copy link
Contributor

@nvcnvn nvcnvn commented Oct 25, 2023

πŸ‘¨β€πŸ’» Changes proposed

  • Add date-time picker (for easier testing time-based turn restriction)

πŸ“· Screenshots

Screenshot 2023-10-25 at 15 37 01

@nilsnolde
Copy link
Member

Thanks, that'd be a nice addition which would make the app much more useful. A couple of comments:

@nvcnvn
Copy link
Contributor Author

nvcnvn commented Oct 25, 2023

  • seems like it's now mandatory to give a date/time? Would be better if it was opt-in, e.g. the default item in the dropdown could be "Anytime" or so and a greyed out date/time field. WDYT?

I just want to clarify the behavior of Valhalla in this case, should "Anytime" (empty date_time) different with "Current" (date_time.type = 0)?
Because most of the time we: A don't care about time, B want to test departure/arrival.

@nvcnvn nvcnvn marked this pull request as draft October 25, 2023 14:30
@nilsnolde
Copy link
Member

Yes it will be different. If you say datetime.type = 0, then it’ll use the current time, ie time will be respected (incl restrictions, but also traffic if it’s loaded). When you don’t want to respect time, then you don’t send the date_time object in the request at all. And I agree, the latter will be the vast majority of requests.

@nvcnvn nvcnvn marked this pull request as ready for review October 27, 2023 04:29
@nilsnolde
Copy link
Member

Thanks, I'll try it out soon. I'd also like to have @chrstnbwnkl opinion, who's much closer to react code than myself.

Copy link
Member

@chrstnbwnkl chrstnbwnkl left a comment

Choose a reason for hiding this comment

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

Thanks @nvcnvn , just a couple of comments!

src/components/datetime-picker.jsx Outdated Show resolved Hide resolved
src/components/datetime-picker.jsx Outdated Show resolved Hide resolved
src/components/datetime-picker.jsx Outdated Show resolved Hide resolved
src/actions/directionsActions.js Outdated Show resolved Hide resolved
src/reducers/common.js Outdated Show resolved Hide resolved
src/Controls/Directions/index.jsx Outdated Show resolved Hide resolved
@nvcnvn
Copy link
Contributor Author

nvcnvn commented Nov 16, 2023

Thanks @nvcnvn , just a couple of comments!

Finally I found some time to update the PR.

Copy link
Member

@chrstnbwnkl chrstnbwnkl left a comment

Choose a reason for hiding this comment

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

Sorry for not getting back to this earlier... Looks like you forgot to check in the renamed datepicker component file?

@nvcnvn
Copy link
Contributor Author

nvcnvn commented Dec 29, 2023

Sorry for not getting back to this earlier... Looks like you forgot to check in the renamed datepicker component file?

ah you are right

Copy link
Member

@chrstnbwnkl chrstnbwnkl left a comment

Choose a reason for hiding this comment

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

...and again sorry for the long wait. LGTM!

@chrstnbwnkl chrstnbwnkl merged commit 60a0a7d into gis-ops:master Jan 30, 2024
1 of 2 checks passed
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.

None yet

5 participants