diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e44772fe..dd621a530 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ _Breaking developer changes, which may affect downstream projects or sites that #### :tada: New Features #### :sparkles: Usability & Accessibility +* Show tag reference information for the currently filled-in tag value in UI fields (if available), instead of only showing the more generic _key_ documentation of the field ([#9786]) #### :scissors: Operations #### :camera: Street-Level #### :white_check_mark: Validation @@ -53,6 +54,7 @@ _Breaking developer changes, which may affect downstream projects or sites that #### :hammer: Development [#8997]: https://github.com/openstreetmap/iD/issues/8997 +[#9786]: https://github.com/openstreetmap/iD/issues/9786 # 2.26.2 diff --git a/modules/ui/field.js b/modules/ui/field.js index b75680d7f..c7f0f2ca5 100644 --- a/modules/ui/field.js +++ b/modules/ui/field.js @@ -204,7 +204,11 @@ export function uiField(context, presetField, entityIDs, options) { referenceKey = referenceKey.replace(/:$/, ''); } - reference = uiTagReference(d.reference || { key: referenceKey }, context); + var referenceOptions = d.reference || { + key: referenceKey, + value: _tags[referenceKey] + }; + reference = uiTagReference(referenceOptions, context); if (_state === 'hover') { reference.showing(false); }