Skip to content

Commit

Permalink
show tag reference info for the currently filled-in tag value, closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrasd committed Jul 21, 2023
1 parent 61af54c commit 46a2d63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion modules/ui/field.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 46a2d63

Please sign in to comment.