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 EDTF-formatted Start Date and End Date fields to iD presets #645

Closed
1ec5 opened this issue Dec 5, 2023 · 1 comment · Fixed by OpenHistoricalMap/iD#187
Closed

Add EDTF-formatted Start Date and End Date fields to iD presets #645

1ec5 opened this issue Dec 5, 2023 · 1 comment · Fixed by OpenHistoricalMap/iD#187

Comments

@1ec5
Copy link
Member

1ec5 commented Dec 5, 2023

As of OpenHistoricalMap/iD#145, every preset comes with a Start Date and End Date field. We should similarly add fields for start_date:edtf and end_date:edtf to the same presets.

The start_date:edtf field should be a moreField of each preset so that it doesn’t clutter up the sidebar when not in use. It should have start_date as its prerequisite so that it slides in underneath that field. Same goes for end_date:edtf.

@1ec5
Copy link
Member Author

1ec5 commented Dec 5, 2023

To keep things simple at first, we can define these fields as ordinary text fields. Just as OpenHistoricalMap/iD#138 validates the syntax and suggests the correct ISO 8601 syntax if it detects certain plain-language patterns (mostly English), we can use edtf.js (or generate something similar using EDTF-Parser) to validate the tag, then use edtfy to suggest an EDTF equivalent to any plain-language tag that we encounter. Note that edtfy only supports English and French at the moment. For bonus points, edtf.js can evaluate EDTF as a date range, which would be useful for the date range filter.

Eventually, it would be great if we could turn these fields into something more structured to complement #644. But that’d be a whole usability challenge on par with making the Opening Hours field more usable: openstreetmap/iD#974.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant