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 schedule field type #101

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add schedule field type #101

wants to merge 1 commit into from

Conversation

1ec5
Copy link

@1ec5 1ec5 commented Jun 1, 2023

Added a new field type schedule for any field that accepts the opening_hours syntax.

The term “schedule” was chosen to avoid implying that it’s only for the timespan semantics in opening_hours as opposed to the point-in-time semantics in service_times or collection_times. A basic UI for all three keys would look essentially the same, especially on native platforms that provide standard controls for this sort of thing. The differences in a more sophisticated custom UI would be minor enough that we can make the distinction in a separate property if necessary.

Fixes #100.

@tordans
Copy link
Collaborator

tordans commented Jun 1, 2023

@1ec5 this sounds great. I am wondering, how could this be extended / further developed into something that allows a schedule-like UI for the *:conditional restriction syntax? For example when used by the street parking mapping.

One additional complexity for the conditional restrictions is, that there are values like something @ wet which are also valid conditions, not just the schedule values something @ Mo-Fr…. And, of course, one field can be an array type but only for the part after the @.

@1ec5
Copy link
Author

1ec5 commented Jun 1, 2023

🤯

Conditional restriction syntax is a couple levels of complexity beyond schema-builder and iD right now. There isn’t even generalized support for any kind of prefix or suffix yet, e.g., openstreetmap/iD#6168.

@tyrasd tyrasd added the enhancement New feature or request label Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add field type for fields that accept opening_hours syntax
3 participants