From 5810b61d5c736b16f41c05aeed4287326bee9163 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Tue, 24 May 2022 14:39:02 +0200 Subject: [PATCH] Imply `access=no` for `highway=construction` objects, closes #9102 --- CHANGELOG.md | 2 ++ modules/ui/fields/access.js | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a50a59c6b..65234d2c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,7 @@ _Breaking developer changes, which may affect downstream projects or sites that * Render `golf` features `tee`, `fairway`, `rough` and `green` in green color and using a grass pattern ([#8927]) * Tweak preset-matching to penalize non-searchable presets when matching OSM objects to presets * Do not overwrite existing `*=no` tags by a preset's `addTags` +* Imply `access=no` in access field of `highway=construction` objects ([#9102]) #### Other * Redact more API tokens from custom imagery sources in changeset metadata tags ([#8976], thanks [@k-yle]) #### :hammer: Development @@ -74,6 +75,7 @@ _Breaking developer changes, which may affect downstream projects or sites that [#8976]: https://github.com/openstreetmap/iD/issues/8976 [#8985]: https://github.com/openstreetmap/iD/issues/8985 [#9021]: https://github.com/openstreetmap/iD/pull/9021 +[#9102]: https://github.com/openstreetmap/iD/issues/9102 # 2.20.4 diff --git a/modules/ui/fields/access.js b/modules/ui/fields/access.js index f8d8b4f96..28bba6665 100644 --- a/modules/ui/fields/access.js +++ b/modules/ui/fields/access.js @@ -207,6 +207,9 @@ export function uiFieldAccess(field, context) { motor_vehicle: 'yes', bicycle: 'yes', horse: 'yes' + }, + construction: { + access: 'no' } }; @@ -227,9 +230,6 @@ export function uiFieldAccess(field, context) { if (tags[d] && Array.isArray(tags[d])) { return t('inspector.multiple_values'); } - if (d === 'access') { - return 'yes'; - } if (d === 'bicycle' || d === 'motor_vehicle') { if (tags.vehicle && typeof tags.vehicle === 'string') { return tags.vehicle; @@ -257,6 +257,9 @@ export function uiFieldAccess(field, context) { } } } + if (d === 'access') { + return 'yes'; + } return field.placeholder(); }); };