54 Commits

Author SHA1 Message Date
Martin Raifer
9779f320a8 Properly handle case sensitive tags in taginfo suggestion in raw tag editor, fixes #9640 2023-05-16 17:06:39 +02:00
Martin Raifer
41aa127d23 reduce use of parseFloat
as it silently strips non-numeric suffixes (e.g. a value of "123 foo" is transformed into a numeric value of 123 by `parseFloat`, which is typically not what we desire)
2022-11-24 19:39:15 +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
c8a3cf154b make more cdn's and API urls/settings configurable
* CDNs for OCI, NSI, etc.
* OSM API (URL and oauth API settings)
* taginfo API
* nominatim API
2022-10-14 19:19:29 +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
Kyℓe Hensel
a4ebc389e1 no auto complete for the via tag (#9140) 2022-06-06 16:54:08 +02:00
Martin Raifer
fe4f5c9548 add "cai_scale" to tags with upper case values
fixes #8706
2021-12-14 15:53:34 +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
Quincy Morgan
a792334c8a Don't fetch taginfo values for more name keys (close #7485) 2020-03-29 11:29:29 -07:00
Quincy Morgan
08f8bce4a7 Fix some code tests 2020-01-06 15:46:02 -05:00
Quincy Morgan
0a3b3df80c Filter out values with fewer 10 or fewer uses from combo field suggestions (close #7203) 2020-01-03 11:49:43 -05:00
Quincy Morgan
2576f58b14 Show uppercase suggestions in the Draft Beers field and update changelog 2019-10-21 11:15:08 +02:00
Quincy Morgan
d7bbbd0017 Suggest uppercase target field values from taginfo 2019-09-13 08:45:51 -04:00
Quincy Morgan
a13a77562e Suggest uppercase country field values from taginfo 2019-09-13 08:40:11 -04:00
Bryan Housel
d3a53309b7 Allow uppercase taginfo results for _ref tags
(closes #6324)
2019-05-07 09:32:13 -04:00
Bryan Housel
b99be67169 When calling an errback from a Promise.catch, pass err.message 2019-04-25 21:58:36 -04:00
Bryan Housel
e6bc9d9e8f Swap out d3-request, swap in d3-fetch 2019-04-24 16:25:25 -04:00
Quincy Morgan
72266af1e5 Show case-sensitive taginfo results for Manufacturer field 2019-04-16 09:59:00 -07:00
Bryan Housel
4a8c20c56e Remove lodash forEach
(re: 6087)
2019-03-28 19:50:20 -04:00
Bryan Housel
4821bf0a68 Remove lodash omit
(re: #6087)
2019-03-26 14:12:45 -04:00
Bryan Housel
7a6c63fcc5 Remove lodash extend (re: #6087) 2019-03-23 00:38:39 -04:00
Bryan Housel
0c7b9a631e Improve combobox event handling and avoid overwriting typed data
(closes #5722, re: #5637, re: #5618)

dispatched with a value() string instead of a datum, which
causes issues for code expecting a datum always.
(such as localized.js brand picker or "Add Field" combo)

Fix for this coming in next commit.
2019-01-22 22:26:27 -05:00
Bryan Housel
f45e97d727 Variable cleanups 2018-12-12 16:13:32 -05:00
J Guthrie
3dbcdc97e4 Remove locale param from #docs which returns all locales by default 2018-11-24 21:41:22 +00:00
J Guthrie
ed66968308 Add localised lang param to API url call 2018-11-24 21:12:51 +00:00
Mateusz Konieczny
82857dd160 tag values with wiki page may be documented as bad
fixes #5460
2018-11-03 15:07:37 +01:00
Bryan Housel
159622f572 Don't lookup postal_code values from taginfo 2018-10-07 16:05:58 -04:00
Bryan Housel
db877ba8bb Add listed_status to whitelist of tags that autocomplete uppercase
(closes #5231)
2018-08-19 00:45:37 -04:00
Bryan Housel
8d711981bf Change stars from integer field to combo, support capital 'S'
(closes #5216)
2018-08-12 11:23:38 -04:00
Bryan Housel
39e170dd5f Add royal_cypher to the capital letter allowing whitelist
(closes #5109)
2018-06-24 12:15:53 -04:00
Bryan Housel
b1252d43ff Add booth field to telephone presets
(closes #5088)
2018-06-24 12:11:56 -04:00
Bryan Housel
be02b1c530 Better placeholders for electrical fields, switch some to combo 2017-10-24 22:30:07 -04:00
Bryan Housel
50da78c1fd Convert lodah-es and d3 to named imports for services 2017-09-25 15:10:47 -04:00
Bryan Housel
14ebd273b5 Make opening_hours a combo
see:  https://github.com/openstreetmap/iD/issues/974#issuecomment-296665907
2017-04-24 09:51:12 -04:00
Bryan Housel
06caeb87b7 Correct lodash _.omit usage
(closes #3965)
2017-04-22 23:05:15 -04:00
Bryan Housel
43b8ab1754 Set debounce wait to 500ms, still feels responsive 2017-04-20 14:13:10 -04:00
Bryan Housel
02688a1fcf Check cache for shortened query that returns fewer than max results 2017-04-20 14:08:38 -04:00
Bryan Housel
62d0bc0bf5 Debounce should debounce all requests even cached, fix tests
(see https://github.com/openstreetmap/iD/pull/3975#issue-222747308)
2017-04-19 13:13:12 -04:00
Bryan Housel
494dd979a9 Never reset the taginfo cache
The data on taginfo is refreshed once per day, so there's no reason to
reissue those API calls during a normal editing session.

reset() gets called after the user saves their changes to OSM
2017-04-19 09:25:09 -04:00
Bryan Housel
c2d6c84aee Exclude popular keys from values lookups..
see #3955
2017-04-18 23:29:01 -04:00
Bryan Housel
b44bd7a427 Increase debounce threshold for taginfo 2017-04-18 21:15:47 -04:00
Bryan Housel
e1a9e7e74d Don't try to force opening-hours value lookups to lowercase
(closes #3629)
2017-03-20 23:02:35 -04:00
Bryan Housel
24d0d6f66e Add brand and grape_variety to uppercase tag exception list 2017-03-17 12:39:59 -04:00
Bryan Housel
a8f12173ac Multikeys filter should allow nested names, ignore alt prefixes 2016-10-31 15:06:17 -04:00
Bryan Housel
053074d076 Export live binding for services in iD.services, fix init/reset
(closes #3324)

Previously we allowed devs to swap out services that they didn't need.
This became difficult now that ES6 exports are immutable bindings.
But we can wrap the immutable bindings themselves in a live object,
to get back the flexibility that we used to have.

This change also drops the `taginfo` accessor on Context, since devs who want
to swap out taginfo service with something else can now do so through the live
binding.  `iD.services.taginfo = myTaginfo()`
2016-10-14 10:38:09 -04:00
Bryan Housel
c4724d7ae7 Allow network, genus, taxon, species lookups to expect uppercase values
(closes #3377)

In most cases we prefer taginfo value results with lowercase letters.
A few OSM keys expect values to contain uppercase values
This is not an exhaustive list (e.g. `name` also has uppercase values)
but these are the fields where taginfo value lookup is most useful.
2016-10-09 15:48:23 -04:00
Bryan Housel
3102a4ae6a Rename all the things to include pseudonamespaces 2016-10-04 19:06:20 -04:00
Tom MacWright
cdb533fa84 Begin d3 v4 update 2016-08-21 15:19:27 -04:00
Tom MacWright
8819d3d061 Remove continued iD references (#3341)
* Remove continued iD references

* make build.js safe enough to dodge json plugin bug

* Package as an iife to avoid var name issue
2016-08-10 20:06:45 -07:00
Minh Nguyễn
4ba0f43ee0 taginfo for relation roles
Enabled taginfo suggestions for roles on relation members and memberships.
2016-08-03 02:59:47 -07:00