Skip to content

Add schedule field type#101

Merged
tyrasd merged 1 commit intoideditor:mainfrom
1ec5:schedule-100
Feb 17, 2025
Merged

Add schedule field type#101
tyrasd merged 1 commit intoideditor:mainfrom
1ec5:schedule-100

Conversation

@1ec5
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
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
Copy Markdown
Contributor 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
@tyrasd tyrasd merged commit c155ab5 into ideditor:main Feb 17, 2025
@tyrasd tyrasd added this to the v7 milestone Feb 17, 2025
@1ec5 1ec5 deleted the schedule-100 branch May 2, 2025 19:26
matkoniecz added a commit to matkoniecz/schema-builder that referenced this pull request Mar 13, 2026
linked https://wiki.openstreetmap.org/wiki/Key:opening_hours/specification per 

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

in ideditor#101
tyrasd pushed a commit that referenced this pull request Mar 18, 2026
linked https://wiki.openstreetmap.org/wiki/Key:opening_hours/specification per 

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

in #101
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