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
f19a55fa13
Add support for icons on multiCombo/semiCombo fields ( #9433 )
2023-05-26 20:35:12 +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
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
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
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
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
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
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
a6be05966b
improve comboboxes: ( #9344 )
...
* 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
2022-11-08 12:09:06 +01:00
Martin Raifer
e8b0c5c7cd
fix leaking of localized strings in combo fields when taginfo is unavailable
...
fixes #9342
and fall back to populate such fields with "static" options if taginfo service is offline
2022-10-25 16:33:59 +02:00
Martin Raifer
d349baad1e
fix loading of non-auto-suggested combo options
...
this was a typo/regression in b5e987b75
2022-10-17 18:35:00 +02:00
Martin Raifer
b5e987b755
fetch options from referenced strings
2022-10-13 19:18:55 +02:00
Martin Raifer
674421eec7
implement fetching string references
...
see https://github.com/openstreetmap/id-tagging-schema/pull/598
2022-10-07 12:04:23 +02:00
Martin Raifer
a2cacaaf24
Don't auto-suggest undocumented tag values which have fewer than 100 uses
...
* 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
2022-08-01 19:10:18 +02:00
Martin Raifer
edf711ca2b
fix rendering of chip labels in localizable multiCombo fields
...
closes #9169
2022-06-22 14:57:58 +02:00
Minh Nguyễn
2433664063
Fixed tagging of localizable keys by multiCombo fields
2022-06-15 16:49:26 -07:00
CommanderRoot
76738daff8
Replace deprecated String.prototype.substr() ( #8988 )
...
String.prototype.substr() is deprecated (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr ) so we replace it with slice() which works similarily but isn't deprecated.
Signed-off-by: Tobias Speicher <rootcommander@gmail.com >
2022-06-06 16:16:38 +02:00
Martin Raifer
c6a802b177
render lang attribute on combo field "chips"
2022-06-06 16:01:57 +02:00
Martin Raifer
8f79932ab1
prevent html injection in combobox dopdowns
...
and use returned wikidata label language for html `lang` metadata
2022-06-06 12:47:14 +02:00
Martin Raifer
040257fd44
replace unnecessary setting of raw "html" with "text"
2021-11-18 18:53:33 +01:00
Quincy Morgan
e57793fab0
Use full width semicombo field for Via field (re: https://github.com/openstreetmap/id-tagging-schema/issues/104 )
2021-01-05 11:07:00 -05:00
Quincy Morgan
c8c288d6a3
Support using delete/backspace on focused, readonly combo fields
...
Make custom combo field values lowercase if they're also made snake_case
2020-12-09 15:26:45 -05:00
Quincy Morgan
cb7f1c2b3c
Update to id-tagging-schema v3.0.0
...
Add UI for translatable combo fields
2020-12-08 15:23:51 -05:00
Quincy Morgan
02add6e3ff
Fix issue where existing multiCombo field values wouldn't appear ( close #8155 )
2020-11-06 16:14:58 -05:00
Quincy Morgan
baace6d092
Update more code for D3 v6
2020-10-07 11:57:25 -04:00
Quincy Morgan
21a49bbec8
Initial support for D3 v6.2.0
2020-10-06 15:08:39 -04:00
Quincy Morgan
087e7eac14
Enable removing multicombo field values with keyboard (re: #8004 )
2020-09-28 15:03:29 -04:00
Quincy Morgan
f163722c9a
Create a new manyCombo field type for the public transport vehicles field instead of using multiCombo in a new way (re: #6142 )
2020-09-24 09:21:59 -04:00
Quincy Morgan
4600ab596f
Add lang attribute to more display labels (re: #7963 )
2020-09-23 10:10:24 -04:00
Quincy Morgan
5435082d9c
Revert t function to returning the plain string by default
...
Add `t.html` function for getting the string with the `lang` attribute
2020-09-22 12:03:29 -04:00
Quincy Morgan
a3f9c3fb81
Merge branch 'develop' into lang-attributes
...
# Conflicts:
# modules/ui/fields/combo.js
2020-09-17 09:07:18 -04:00
Quincy Morgan
98bea69947
Add Vehicles field for public_transport presets ( close #6142 , re: #7970 )
...
Enable variant type of `multiCombo` field that works for any listed keys, not ones under a prefix
2020-09-16 15:15:10 -04:00
Quincy Morgan
32f8274929
Make t function return a span element with a lang attribute unless html: false is specified in the options (re: #7963 )
...
Update `text` functions to `html` to support inserting the `span` elements
Specify `html: false` for various instances where a `span` is not desired, e.g. `placeholder` and `title` attributes
2020-09-15 21:56:22 -04:00
Quincy Morgan
5fbaad1088
Make the waterway destination field separate from the road sign destination field (re: 7c5ec9be70)
...
Make the destination field for the destination_sign preset a semiCombo (re: #6970 )
2020-06-24 16:31:28 -04:00
Quincy Morgan
cc52b6cfd4
Prevent empty combo fields from adding a blank tag
2020-06-18 10:51:12 -04:00