Martin Raifer
aa96a67c65
use lodash-es everywhere, replace custom clamp methods with lodash
2025-04-21 14:43:35 +02:00
Martin Raifer
79362ea7a8
filter empty strings from preset aliases
2025-03-17 14:01:11 +01:00
Martin Raifer
74dc459a4a
drop unused import
2025-03-17 12:12:26 +01:00
Martin Raifer
8b1c37bdaf
take location into account for default values from regional fields
2025-03-17 11:33:42 +01:00
Martin Raifer
78f94632d7
don't inherit fields for tags that the preset already has a field for
...
this is useful if a preset wants to inherit some fields from another preset, but wants to replace some of the fields with special versions of the field (e.g. a `…_yes` field for an added default value), or to change the `fields`/`moreFields` classification of a field
2025-03-17 11:33:42 +01:00
Martin Raifer
8274384311
Fix validator suggesting to add empty *:wikipedia tags to NSI presets ( fixes #10140 )
2024-02-29 10:30:18 +01:00
Martin Raifer
4829f8a1da
drop *:wikipedia tags when selecting a NSI-based, fixes #9103
2024-02-16 14:32:58 +01:00
Kyℓe Hensel
53a510628c
fix crash when selecting some presets ( #9738 )
2023-07-07 15:15:15 +02:00
Martin Raifer
5a3a2d876e
show inherited fields from global parents
...
fixes regression from 43784e2ef
2023-05-26 19:44:27 +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
dd30a39d74
fix logic bug, extend test coverage
2022-10-27 17:07:32 +02:00
Martin Raifer
96bac0650b
on preset change: don't drop tags if ∃ a matching field in the new preset
...
closes #9341
closes #9104
2022-10-27 13:06:00 +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
209cc23d92
don't inject html code in preset names
2022-06-24 19:11:00 +02:00
Martin Raifer
d486ab197d
sort preset search results by matching aliases, add tests
2022-05-25 10:25:29 +02:00
Martin Raifer
8796a412f8
support aliases in preset search
...
closes #6139
2022-05-24 17:15:01 +02:00
Martin Raifer
2ca52e75ce
Do not overwrite existing *=no tags by a preset's addTags
2022-05-24 14:18:17 +02:00
Martin Raifer
04a07092d2
Handle more "hybrid" area+line tags as area-by-default, fixes #8985
2022-02-16 15:56:28 +01:00
Martin Raifer
09d98b7095
slighty penalize non-searchable presets
...
as a tie-breaker in case a searchable preset also matches the same object,
see https://github.com/openstreetmap/id-tagging-schema/issues/399#issuecomment-1039902506
2022-02-15 12:25:27 +01:00
Bryan Housel
4228b65602
Support more *:wikidata tags for field locking and pin styling
2021-01-18 17:18:37 -05:00
Quincy Morgan
af4acaec79
Don't clear power output tag when changing between power presets ( close #8159 )
2020-12-21 13:17:18 -05:00
Quincy Morgan
2591a13f9c
Honor diacritics on preset search value but still compare to stripped preset names (re: #8242 )
2020-12-21 11:14:10 -05:00
Quincy Morgan
b3ad282f40
Ignore diacritics when searching presets ( close #8242 )
2020-12-09 17:12:43 -05:00
Quincy Morgan
baabd81987
Unbundle id-tagging-schema data and translations
...
Update for id-tagging-schema 2.0.0
2020-12-01 11:14:14 -05:00
Quincy Morgan
4d51713253
Add lang attribute to more display text (re: #7963 )
2020-09-24 11:34:33 -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
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
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
8708c13f87
Followup changes to #7932
2020-09-03 14:00:30 -04:00
Peter Newman
4205ca1d07
Fix the seemingly safe spellings found by codespell
...
Untested, only checked by inspection.
(cherry picked from commit 2c47a11008 )
2020-08-10 17:32:37 +01:00
Quincy Morgan
a1af118f0e
Ensure locales and presets are loaded before the UI loads ( close #7406 )
...
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
2020-03-31 12:23:31 -07:00
Bryan Housel
3608659d21
Restore field inheritance
2020-02-10 16:22:13 -05:00
Bryan Housel
0357c2b80c
Rework presets.js file - WIP to fix resolving field inheritance
2020-02-07 14:17:19 -05:00
Bryan Housel
3c6ba9703a
presetIndex.build -> presetIndex.merge, and make it merge data
2020-02-05 21:13:15 -05:00
Bryan Housel
e3e7cd3003
Memoize presetCollection.item (it's an Array.find)
...
Also add tests for `matchAllGeometry`
2020-02-05 10:32:20 -05:00
Bryan Housel
0fe766d9a4
WIP on external presets
...
- preset data is no longer bundled into iD.js
- some code pathways commented out re: external presets
- many changes so that tests can run without presets at start, or async
- still need to make sure fallbacks are always there (point, line, area, etc)
2020-02-05 09:38:26 -05:00
Quincy Morgan
6bb2997306
Enable changing the preset of multiple selected features (re: #7276 )
...
Fix issue where preset tag reference wouldn't load
Change "Change feature" tooltip to more accurate "Change feature type"
2020-01-21 15:19:51 -05:00
Quincy Morgan
41355bf2a0
Rename "visible" property of presets to "addable" (re: a06ec59514b30a52601e3614ef69006d2dc1bc91)
2020-01-15 14:29:45 -05:00
Quincy Morgan
11dfe7e571
Add util function for generating classes/ids from any string
2019-12-20 12:37:53 -05:00
Bryan Housel
2fd6359505
Boost matchScore if additional matches occur in addTags
...
(closes #6802 )
2019-08-26 12:53:03 -04:00
Tobias Zwick
f1d9b82831
inherit preset.removeTags from preset.addTags if not defined
2019-04-30 09:50:47 +02:00
Quincy Morgan
228af9a000
Move areaKeys and setAreaKeys to modules/osm/tags
2019-04-26 12:53:05 -07:00
Quincy Morgan
d01bb78707
Reduce circular dependencies caused by importing from indexes, the location of the validation models, and the location of areaKeys ( close #6237 )
2019-04-24 13:45:59 -07:00
Quincy Morgan
34792d7fbf
Don't add field defaults when upgrading tags to a specific replacement
2019-04-03 10:57:42 -07:00
Bryan Housel
5b4aa529de
Replace lodash uniq
...
(re: 6087)
2019-03-27 02:43:25 -04:00
Bryan Housel
4821bf0a68
Remove lodash omit
...
(re: #6087 )
2019-03-26 14:12:45 -04:00
Bryan Housel
0e90167513
Remove lodash clone
...
(re: #6087 )
2019-03-22 23:18:25 -04:00
Quincy Morgan
705f15aadd
Speed up search by cacheing preset text values and not scrolling to focused node as often
2019-03-21 11:19:20 -04:00
Quincy Morgan
933569f8c6
Inherit check fields even if they define the preset
2019-03-13 12:59:06 -04:00
Quincy Morgan
3723c741f1
Add border to point icons in top bar
2019-03-02 14:47:48 -05:00