-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 road height field with unit dropdowns #8075
Conversation
ad8903e
to
796537d
Compare
data/presets.yaml
Outdated
@@ -1436,8 +1436,6 @@ en: | |||
maxheight: | |||
# maxheight=* | |||
label: Max Height | |||
# maxheight field placeholder | |||
placeholder: '4, 4.5, 5, 14''0", 14''6", 15''0"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This placeholder could probably be restored, but rewritten so that it only encourages the use of .
as a decimal separator but doesn’t encourage putting '
and "
directly in the field.
# symbol for meters | ||
meter: m | ||
# abbreviation of feet | ||
foot: ft |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These abbreviations are already present in the YAML file, but only as part of format strings:
Line 2278 in bb56584
feet: "{quantity} ft" |
In theory, we could reuse those strings to decide whether to display the unit dropdown to the left or right of the input box, but I don’t know if any language needs that extra complexity.
Regarding #7129 (comment), I think we could generalize this field to cover the other length fields (Height, Length, Width, and Elevation). However, if we ever add fields for |
Add `roadheight` field type for openstreetmap/iD#8075 Add `locationSet` info to the readme
The new maxheight field type would be useful for openstreetmap/id-tagging-schema#232 as well. |
000f0ad
to
cdb6317
Compare
cdb6317
to
39fe87a
Compare
Implemented the
roadheight
field type based on theroadspeed
field type. The new field has an explicit option to choose the unit of measurement (between meters and feet). When the field is set to feet, an additional input box lights up to allow the user to enter inches separately.Initial state in Vietnam:
maxheight=4.8
:Initial state in the U.S.:
maxheight=12'
:maxheight=12'6"
:maxheight=36"
:maxheight=below_default
:Multiple selection:
Fixes #3614. Depends on rapideditor/country-coder#30.