Martin Raifer
2b64d70352
generalize implementation to skip input value update
...
when contents are "equivalent" in a given context, e.g. for numeric values with potentially different formatting in number fields
2023-05-26 19:24:10 +02:00
Martin Raifer
e0f11af2b2
also allow "raw" numbers to be input in numeric fields
...
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.
2023-05-26 18:38:16 +02:00
Martin Raifer
b266ec57ad
treat "empty" numbers in semicolon separated "list" as invalid
2023-05-26 15:00:10 +02:00
Martin Raifer
6d01c05f76
allow numbers to be input in "raw" format
2023-05-26 13:44:50 +02:00
Martin Raifer
249771d747
fix variable declarations
2023-05-26 13:25:59 +02:00
Martin Raifer
6c362b6517
Merge branch 'develop' into 1ec5-number-field-format-3615
2023-05-26 13:06:09 +02:00
Martin Raifer
43784e2eff
take entity loc into account when resolving fields via parent preset, fixes #9524
...
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.
2023-05-25 19:19:09 +02:00
Martin Raifer
28630ae9fc
don't repeat values from multi-selection in dropdown
...
as their state can now been toggled using the checkbox in the chip
2023-05-25 18:47:30 +02:00
Martin Raifer
805becfe3b
support no and "other" states of options of multiCombo/manyCombo fields
...
closes https://github.com/openstreetmap/id-tagging-schema/issues/895 and #7427
2023-05-25 18:17:00 +02:00
Martin Raifer
559a4ba728
support input fields with multiple tag keys
...
requires upstream changes from tagging-schema v6.3, see https://github.com/openstreetmap/id-tagging-schema/issues/905
2023-05-23 15:22:58 +02:00
Martin Raifer
a35653d35d
use all available option strings when setting value
...
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
2023-05-11 15:06:37 +02:00
Martin Raifer
140e56768e
fix hiding of "Add" input on comboboxes with fixed options
...
the check for this needs to be done after the available options are actually refreshed
2023-05-02 14:10:48 +02:00
Martin Raifer
24e514fa99
defer loading of static combo options
...
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
2023-05-02 13:01:32 +02:00
archpdx
e466ad4bf8
Update dependencies country-coder and location-conflation ( #9546 )
2023-03-30 12:53:38 +02:00
Minh Nguyễn
ab442b76ac
Preserve precision in raw tags
2023-03-04 23:43:40 -08:00
Minh Nguyễn
023907f9e2
Fixed incrementing/decrementing formatted numbers
...
The float formatter function now takes a number of fraction digits to return.
2023-03-04 18:36:06 -08:00
Minh Nguyễn
4e1129709c
Fixed exception formatting nonexistent value
...
Co-authored-by: Martin Raifer <martin@raifer.tech >
2023-03-03 22:48:30 -08:00
Minh Nguyễn
74fdf17477
More minor corrections from code review
2023-03-03 22:42:14 -08:00
Minh Nguyễn
9817894752
Apply suggestions from code review
...
Co-authored-by: Martin Raifer <martin@raifer.tech >
2023-03-03 22:42:14 -08:00
Minh Nguyễn
0dadd8b31c
Clean roadheight value after concatenation
2023-03-03 22:42:14 -08:00
Minh Nguyễn
2ba7177080
Polyfill inadequate Intl support
...
Ensure that formatting is balanced with parsing to avoid truncating numbers.
2023-03-03 22:42:14 -08:00
Minh Nguyễn
252828bb4b
Localize numbers in numeric fields
2023-03-03 22:42:14 -08:00
Martin Raifer
fc5b78ba0a
show 'set to today' button also on 'survey:date' field
2023-01-27 17:10:02 +01:00
Martin Raifer
3238d3439c
fix linter issues
2023-01-27 17:05:43 +01:00
Martin Raifer
adcbdae6e8
implement date field, for #9477
2023-01-27 17:03:28 +01:00
Martin Raifer
deb2b15cf4
load value icons in combo fields, increase their size slightly
...
as specified in the tagging schema [v6](https://github.com/ideditor/schema-builder/blob/main/CHANGELOG.md#600 )
for #9477
2023-01-24 15:10:50 +01:00
Martin Raifer
d9695f1cef
update directionalCombo fields to tagging schema v6 schema
...
keeping a fallback to v5's `cycleway` field type for now
for #9477
2023-01-24 14:25:53 +01:00
Martin Raifer
4b83dceec1
don't split values in semiCombo fields split with , in descriptions
...
fixes #9471
2023-01-18 19:10:09 +01:00
Martin Raifer
aeeb441e8b
fix regression: labels are not rendered in multi/semiCombo chips
...
regression was in 479586be37
2022-12-16 12:13:16 +01:00
Martin Raifer
89afee1ad5
lint code
2022-12-12 16:11:15 +01:00
Martin Raifer
479586be37
combo boxes can consume complex label strings now:
...
instead of `"strings": { "options": { "<tag-value>": "<translatable-string>", …` it is now also supported to have:
```
"strings": {
"options": {
"<tag-value>": {
"title": "<translatable-string>",
"description": "<translatable-string>"
},
…
```
2022-12-09 19:34:13 +01:00
Martin Raifer
4c222fde0a
make sure editing multi selection doesn't corrupt tags
...
because the common tag vs. left/right tag situation can be different for different entities in the multiselection, the approach to merge/split/update the tags needs to be made on a per entity basis
this introduces a new way to specify tag changes: a callback function which is called for each to be modified entity
2022-12-09 19:01:44 +01:00
Martin Raifer
08ae8a3fac
reuse combo field module from within directional_combo
...
reducing duplication of code, and brings missing features to the directional version of the field
2022-12-09 17:28:00 +01:00
Martin Raifer
80d3e767cc
rename to "directional combo" field
2022-12-09 13:52:57 +01:00
Martin Raifer
d7cbf058ee
make cycleway field modular (i.e. accept any supplied keys)
2022-12-09 13:52:02 +01:00
Martin Raifer
6239cc0ccc
Merge branch 'maxlength-indicator' into develop
2022-12-02 18:37:59 +01:00
Martin Raifer
dcd7fb4938
don't include misspelled taginfo suggestions in combo fields
2022-12-02 13:49:49 +01:00
Martin Raifer
d5872cca73
show prettier maxChars warning for changeset comments
...
from #9392
2022-11-28 19:08:37 +01:00
Martin Raifer
6c9ffdc854
lint
2022-11-26 10:28:20 +01:00
Martin Raifer
59b10b7974
add length indicator for semicombo fields as well
2022-11-25 18:52:13 +01:00
Martin Raifer
2c0ca277bf
add max-length-indicator to combo fields
2022-11-25 18:18:51 +01:00
Martin Raifer
f931d447af
add length indicator to regular text (and localized) fields
2022-11-25 18:10:14 +01:00
Martin Raifer
5091966056
[WIP] add string length indicator and max-length message
2022-11-25 17:48:33 +01:00
Martin Raifer
f573c374c2
number field: improve +/- buttons
...
* Clamp degree values in `direction` fields between 0 and 359 degrees, fixes #9386
* Only match cardinal values to numbers in `direction` fields
* Disable increment/decrement buttons on number fields if the input value is not numeric or when there is a multi-selection with conflicting values
* Fix/implement reverse operation for semicolon delimited `direction` values
2022-11-24 15:16:49 +01:00
Martin Raifer
d9a4d6cbde
Fix crash when multiselection has differing values in combo field
...
closes #9369
2022-11-12 22:03:28 +01:00
Martin Raifer
9d8116ff6d
don't indent combo content when there is no icon for tag value
2022-11-08 19:29:23 +01:00
Martin Raifer
635c498548
make tag value icons work for translatable strings, too
2022-11-08 19:20:47 +01:00
Martin Raifer
62113dcf74
improve icons in comboboxes: update while typing, fix spacings
...
also makes sure checkbox & radio are aligned with the left padding of the respective input fields
2022-11-08 18:48:06 +01:00
Martin Raifer
ef044cd17d
Show icons depicting the different values of the crossing:markings field
...
for https://github.com/openstreetmap/id-tagging-schema/pull/590
2022-11-08 13:47:39 +01:00
Martin Raifer
501011ef4d
use colour field type instead of relying on the tag key
...
see #9320
2022-11-08 13:16:08 +01:00