as it silently strips non-numeric suffixes (e.g. a value of "123 foo" is transformed into a numeric value of 123 by `parseFloat`, which is typically not what we desire)
* pressing return/enter doesn't deselect the entity anymore
* predefined ("static") field options are always listed in the combobox dropdown, even if taginfo doesn't include them (because of low usage)
* (raw) tag values can also be entered for localized strings
* static localized strings can be used before taginfo response is received (useful when taginfo is slow or unavailable)
* fixes some bugs which can be triggered when taginfo is slow
* fixes a bug where the autocomplete dropdown doesn't work properly when tags have "few" values
* multiCombo fields can be case-sensitive now
* previously, this check was based on the "fraction" of the respective tag value, which excluded more values for common tag keys, but fewer for less common ones.
* this sets a limit of 100 uses for undocumented tags (key=value pairs)
* tags with a wiki page are always allowed
* this harmonizes the heuristic of which tags to show between preset fields and the raw tag editor (previously, there was an additional `count > 10` filter present in combo fields, which is now uncessary)
closes#9227
Consolidate localization behavior and init to a coreLocalizer function and singleton
Explicitly support `en-US` locale
Rename coreData to coreFileFetcher and export a singleton rather than using a property of coreContext
Add `apiConnections` property of coreContext to simplify adding a source switcher
Replace some init functions with re-callable, promise-supporting `ensureLoaded` functions
Make coreContext itself load the UI if a container has been specified at init time
Fix code tests
(closes#5722, re: #5637, re: #5618)
dispatched with a value() string instead of a datum, which
causes issues for code expecting a datum always.
(such as localized.js brand picker or "Add Field" combo)
Fix for this coming in next commit.
The data on taginfo is refreshed once per day, so there's no reason to
reissue those API calls during a normal editing session.
reset() gets called after the user saves their changes to OSM
(closes#3324)
Previously we allowed devs to swap out services that they didn't need.
This became difficult now that ES6 exports are immutable bindings.
But we can wrap the immutable bindings themselves in a live object,
to get back the flexibility that we used to have.
This change also drops the `taginfo` accessor on Context, since devs who want
to swap out taginfo service with something else can now do so through the live
binding. `iD.services.taginfo = myTaginfo()`
(closes#3377)
In most cases we prefer taginfo value results with lowercase letters.
A few OSM keys expect values to contain uppercase values
This is not an exhaustive list (e.g. `name` also has uppercase values)
but these are the fields where taginfo value lookup is most useful.