It’s been almost 13 years since this issue was opened on the iD editor:
openstreetmap/iD/issues/974 (for some reason i am only allowed to attach three links)
I came across it while browsing for GSoC projects related to iD, and after reading through the entire discussion thread I thought it would be interesting to try improving the UI for opening_hours.
From what contributors like 1ec5 and others have pointed out over the years in the issue, there are a few important constraints to keep in mind:
- The
opening_hours syntax is very complex.
- The field has limited space and needs to fit both horizontally and vertically.
- We need a minimal UI for visualization and editing first; validation can come later.
- For complex cases, users should still be able to fall back to editing the raw syntax directly.
- We can rely on
opening_hours.js for parsing.
With those points in mind, I put together a small demo UI to explore how this might work and to get some early feedback from the community.
For now I haven’t added validation or prettified value display yet the focus is just on the UI concept.
Right now I’m thinking we can consider three main states:
1. Simple value already mapped
This shows the new structured editor where users can visualize and edit the hours. There’s also a Raw tab to switch to direct text editing if needed.
(Later this will also show a prettified version of the value.)
2. Complex value already mapped
If the value is too complex for the structured UI, the editor won’t be shown. Instead, users can edit the raw text directly, and the YoHours link is still available for more advanced editing.
3. No value yet
A toggle allows users to open the structured editor and add hours, or they can simply type the raw syntax into the input field.
I’d really appreciate any thoughts, suggestions, or guidance on this approach. Thanks!
1 Like
Hi, thank you for taking the time to put together this demo. For your awareness, Google Summer of Code only pays for work completed during the official program period after Google has accepted your application. You’re more than welcome to continue working on the opening hours overhaul, either as part of GSoC or independently. However, you won’t receive any compensation for the work you do before the program begins. Your proposed workplan should not repeat work you’ve already completed.
The rules also require you to make code contributions to the relevant project. If you want to work on this project as part of GSoC, you’ll need to make other contributions to iD ahead of the application deadline. It doesn’t have to be a major effort like the opening hours overhaul. Ideally it’s something that can be completed ahead of time. I hope this doesn’t arrive as bad news, as we do appreciate your interest in OSM and iD. If you have any questions, please contact the organization administrators directly at gsoc-orga@open street map.org. Thank you for understanding.
3 Likes
Hey, thanks for the response I totally get that work done before the official program period won’t count towards compensation, I just thought getting some early community feedback on the UI would help strengthen my proposal.
for now I’ll put the opening hours widget on hold and shift my focus to writing the proposal. Also I already have some contributions to iD and will keep those coming in the meantime.
Thanks again!
2 Likes
Hi, I’m also applying for GSoC with a proposal around improving the opening_hours UI in iD. I’ve been thinking along similar lines - starting with a structured timetable UI for common cases and falling back to raw input for complex ones.
I’ve also opened a small PR to start getting familiar with the codebase. Would love to hear if there are specific constraints or parts of the current implementation that I should look into more closely.
Here is the pr: Improve opening_hours placeholder clarity by eeshm · Pull Request #2140 · openstreetmap/id-tagging-schema · GitHub