* Field: fix wikiURL by URL encoding it - and slight refactors
* Field: fix wikiURL only encodeURIComponent instead of redundant full URL
* Field: refactors function to generate wikiURL, ensures anchor part is also URI encoded, ensures the anchor ref is not encoded, adds unit tests
* Field: refactors wikipedia URI encoding of the anchor logic, removes legacy anchorencode effort via try-catch that replaced percentage character with dots, adds unit further tests, reduces exessive inlining
* Fields: Break long lines in combo dropdown instead of ellipsis
Longer translations keys are not readable with ellipsis and the tooltip only shows the description (or fallback), not the title.
This change makes long use line breaks with small line height to make the whole text visible.
* Fields: Use table styles for rows to maximize available space
The flex box solution gave a lot of space to the label. This solution minimizes that space to give more space to the values dropdown.
The common use case is for the `sources` key, often you have multiple URLs separated with semicolon.
This allow to navigate to URL and check them more easily instead of
doing manual work to select the URL copy and paste.
Created with the help of Martin Raifer at the sotmeu2023!
fixes#9898
Fixes a problem that occurs because the order of the field `options`
can be in general different from the order returned by taginfo
(taginfo sorts by usage, while presets typically are sorted alphabetically),
causing different values to be potentially selected for autocomplete values.
As the taginfo results typically come in a few moments delayed, this can
lead to confusing behaviour.
This solves it by just not reattempting an autocomplete using the taginfo
results, if a field has static options available.
when a user enters a decimal number using the "international"/English/OSM-raw-data formatting (e.g. as in `0.5`), it is parsed using the basic, non-localized, number parser. In such cases, the content of the input field should not be overwritten with the localized formatting, as that would cause unexpected glitches and make editing harder (e.g. when thousands-grouping characters seemingly "magically" disappear or appear while typing).
see https://github.com/openstreetmap/iD/pull/8769/#pullrequestreview-1324246437 ff.
this necessary when a regional preset (e.g. from NSI) is supposed to inherit fields from a parent preset, but the direct parent does NOT apply at the location of the entity to be added/edited. In that case we need to search for a potential regional variant of the parent preset.
this fixes where tag values of fields with referenced strings can become corrupted when the sub-field has restricted `options`, and an unavailable option is entered manually into the field.
important for openstreetmap/id-tagging-schema#891
fixes a bug where `multi/many/semiCombo` options are not selectable immediately after they were removed from a field, when the field does not use taginfo to fetch options