Commit Graph

465 Commits

Author SHA1 Message Date
Martin Raifer
a2d3cf8f9a fix jumping cursor while editing in some input fields
fixes #9233
2023-08-03 16:49:37 +02:00
Martin Raifer
57ca36227b fix clearing of contents of some input field when the tag is removed
e.g. when using the trash can icon on the UI field
2023-08-02 17:54:48 +02:00
Martin Raifer
61af54c069 fix combo field's dropdown when tag reference info is displayed
show it immediately after the input field instead of after the tag documentation text
2023-07-21 10:44:21 +02:00
Martin Raifer
9bd5817ecc don't crash on invalid identifiers
fixes a bug where the link button would not be correctly disabled on invalid identifier values

(regression in 7015fae91c)
2023-07-17 19:40:36 +02:00
Martin Raifer
7b44dfaa1b fix sorting of nearby streets in address field dropdown 2023-07-17 14:09:36 +02:00
Martin Raifer
1c1086662e fix crash when a multisel. contains empty&non-empty numeric vals, fixes #9739
this is a regression/bug in 559a4ba
2023-07-07 18:22:18 +02:00
Martin Raifer
85affbadc8 lint 2023-07-07 13:34:08 +02:00
Martin Raifer
ea054a00a5 fix bug in "lang=badvalue" handling for wikidata api
see https://github.com/openstreetmap/iD/pull/9638#issuecomment-1623497481
2023-07-07 12:49:55 +02:00
Martin Raifer
9595e997e9 Merge branch 'develop' into addr_place 2023-05-26 20:37:54 +02:00
Martin Raifer
f19a55fa13 Add support for icons on multiCombo/semiCombo fields (#9433) 2023-05-26 20:35:12 +02:00
Martin Raifer
53f77fb852 accept raw number input also for roadspeed/roadheight fields 2023-05-26 19:34:32 +02:00
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
Martin Raifer
9aa28faf4a only offer admin_level>8 for addr:place
as admin_level=8 is for `addr:city`
2023-04-30 21:07:15 +02:00
Martin Raifer
6f9bb116f3 fix logic bug, make condition more readable 2023-04-30 20:56:51 +02:00
Martin Raifer
aca88bf702 fix bug in getting nearby postcodes 2023-04-28 19:55:43 +02:00
Martin Raifer
caac22fe16 show addr:street when both it and addr:place is present
as in this case it is likely a mapping mistake where the "place" should actually be addr:city (or addr:suburb, etc.)
2023-04-28 17:52:55 +02:00
Martin Raifer
026737909f implement special address field for addr:street/addr:place 2023-04-28 16:36:05 +02:00
Martin Raifer
a0b5cf5334 filter address combo field while typing 2023-04-27 17:25:58 +02:00
Martin Raifer
5cd5c10d92 consolidate similar methods 2023-04-27 17:25:58 +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