Commit Graph

176 Commits

Author SHA1 Message Date
Martin Raifer
209cc23d92 don't inject html code in preset names 2022-06-24 19:11:00 +02:00
Martin Raifer
9576e95d83 change label of ui fields from raw html to a callback function
fixes #9159
2022-06-23 10:49:38 +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
4a55249dee fix code style issues 2022-05-25 13:45:55 +02:00
Martin Raifer
29d4ab6866 search presets by tag "key=value" syntax
closes #8869
2022-05-25 10:58:08 +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
Milos Brzakovic (E-Search)
18f7e91b50 matchTags - improve indexing data structure 2021-10-25 12:10:20 +02:00
Milos Brzakovic (E-Search)
dee8cdfe07 matchTags- don't do locationsAt if locID is +Q2 2021-10-21 11:03:44 +02:00
Milos Brzakovic (E-Search)
599d2df19b matchTags - don't calculcate valid locations unless needed
mismatched_geometry - small optimization
2021-10-20 09:49:00 +02:00
Bryan Housel
ec787f81ad Location-aware preset matching 2021-03-23 12:39:14 -04:00
Bryan Housel
3cf5f69082 Allow missing locationSetID on presets, fields, categories
This simplifies the code a bit, just treat it as worldwide if missing
2021-03-12 12:27:50 -05:00
Bryan Housel
f95e7db8c9 Create the categories like the presets
The lack of locationSet was causing them to not show up, which indirectly
broke the tutorial at the step where user needs to pick the road category.
2021-03-12 12:04:52 -05:00
Bryan Housel
4228b65602 Support more *:wikidata tags for field locking and pin styling 2021-01-18 17:18:37 -05:00
Bryan Housel
f39f73e3ae Make sure suggestion preset terms get used in the search 2021-01-18 15:02:07 -05:00
Bryan Housel
868db8819f Have mergeLocationSets work on Objects, add locationSetID property
This means less work for the other parts of the code,
now they don't need to chain that extra step after the promise.
2021-01-09 10:34:58 -05:00
Bryan Housel
271e1c2e19 Use locationManager to filter fields/presets/defaults 2021-01-08 16:06:57 -05:00
Bryan Housel
0ad7de0f10 Move the location index and resolver into a global coreLocations 2021-01-08 11:29:51 -05:00
Bryan Housel
9eb6f8781f Update presetIndex to resolve and index locationSets
Added a deferred work queue to do this with requestIdleCallback in the background
2021-01-06 16:26:12 -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
6cd81df1a2 Fix preset search result sorting (re: #8242) 2020-12-21 11:26:34 -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
d57ed85e98 Merge branch develop 2020-12-16 11:43:36 -05:00
Quincy Morgan
b3ad282f40 Ignore diacritics when searching presets (close #8242) 2020-12-09 17:12:43 -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
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
dc8fd13586 Enable array-callback-return eslint rule 2020-10-23 13:47:09 -04:00
Quincy Morgan
cb6ab1405b Enable additional eslint rules, including no-unreachable-loop 2020-10-23 10:54:28 -04:00
Quincy Morgan
2769ac87f1 Support territories in preset and field country limiters (re: #8102) 2020-10-21 18:21:17 -04:00
Quincy Morgan
47ae71ce16 Revert "Support territories in preset and field country limiters (re: #8102)"
This reverts commit a3a9259859.
2020-10-21 18:17:52 -04:00
Quincy Morgan
a3a9259859 Support territories in preset and field country limiters (re: #8102) 2020-10-19 13:12:05 -04:00
Quincy Morgan
c214a6c6e2 Add increment property for numeric fields (close #7867) 2020-10-13 12:00:01 -04: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
93cf717110 Include lang attribute in field labels 2020-09-22 13:33:52 -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
49526a7a67 Fix JS error upon changing addablePresetIDs after initial load
Accept addablePresetIDs as an array
Add code tests for invalid preset IDs in addablePresetIDs
2020-06-02 11:19:30 -04:00
Quincy Morgan
78a4b75e55 Fix regression where explicit addable presets were not populating the default preset list 2020-05-28 16:16:35 -04:00
Quincy Morgan
90b1395df4 Fix code tests 2020-04-01 13:27:30 -07:00
Quincy Morgan
60f7dc7c0b Replace presets property of context with singleton
Remove utilPreset
2020-04-01 13:08:45 -07:00
Quincy Morgan
527faa7b42 Remove need for coreContext in presetIndex 2020-04-01 11:25:45 -07:00
Quincy Morgan
a58abe3c6f Move localStorage interface from a property of coreContext to a corePreferences function 2020-04-01 11:00:48 -07:00
Quincy Morgan
a950b193d1 Fix preset categories 2020-03-31 16:41:46 -07: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