ideditor / schema-builder

🏗🏷 Create tagging schemas for iD
ISC License
12 stars 16 forks source link

Add schedule field type #101

Open 1ec5 opened 1 year ago

1ec5 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

🤯

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.