Commit Graph

287 Commits

Author SHA1 Message Date
Quincy Morgan
8734b67821 Remove the context.intersects passthrough function 2020-04-01 15:36:53 -07:00
Quincy Morgan
60f7dc7c0b Replace presets property of context with singleton
Remove utilPreset
2020-04-01 13:08: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
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
d62a62cba8 Make popover and tooltip part of the UI module instead of utils 2020-03-24 17:32:09 -07:00
Quincy Morgan
0931459dba Reduce use of global selection (re: #7445) 2020-03-24 13:02:06 -07:00
Quincy Morgan
8c31b99919 Focus wikidata field input when clicking its label
Remove for/id for readonly fields
2020-03-22 12:57:38 -07:00
Quincy Morgan
3c0b926ec7 Replace coreContext.geometry function with a more explicit coreGraph.geometry function 2020-03-21 14:23:44 -07:00
Quincy Morgan
8439795b58 Fix lint warning 2020-03-21 13:57:17 -07:00
Quincy Morgan
fac613e1dc Remove context.childNodes function 2020-03-21 13:56:11 -07:00
Quincy Morgan
4872b06a28 Randomize form field ids to thwart browser memory and help with embedding iD (close #6444) 2020-03-21 13:16:40 -07:00
Quincy Morgan
152d89fa22 Convert some element ids to classes to avoid collisions when embedding iD 2020-03-20 13:10:39 -07:00
Bryan Housel
3608659d21 Restore field inheritance 2020-02-10 16:22:13 -05:00
Bryan Housel
4aa4686e7f Fix test failures in localized and suspicious_names 2020-02-03 12:38:17 -05:00
Quincy Morgan
2783408fc3 Add tooltips to mixed values in semicombo, multicombo, and radio fields 2020-01-31 14:07:16 -05:00
Quincy Morgan
af928e3dc1 Support radio fields during multiselections 2020-01-31 13:02:30 -05:00
Quincy Morgan
8d9adbd902 Lock the name field if any of the selected features should be locked (re: #7306) 2020-01-31 11:23:42 -05:00
Quincy Morgan
b3262a71dc Use newlines instead of semicolons to separate mutliselection tag values in tooltips (re: #7306) 2020-01-31 10:49:31 -05:00
Quincy Morgan
15e9599ff7 Support editing the Name and Multilingual Name fields during multiselection 2020-01-30 17:09:19 -05:00
Quincy Morgan
1b331bb678 Add mechanism for fields to support editing during multiselection (re: #7276)
Add `utilCombinedTags` method and use it for the raw tag editor as well as fields
Pass `entityIDs` array into fields instead of single `entity` object
Give field revertion its own path separate from `change`
Add multiselection editing to fields in files: access, address, check, combo, cycleway, input, maxspeed, textarea, and wikidata
2020-01-30 13:53:29 -05:00
Bryan Housel
33a2dafc10 Fetch wmf-sitematrix from CDN.. No need to depend on it anymore. 2020-01-30 09:48:37 -05:00
Bryan Housel
c481f90e7d Stop bundling wmf-sitematrix, move it extern
This also includes a bunch of tweaks to make the tests work
in both PhantomJS and modern browsers like Chrome.

Basically - introduce some more async into the test code so that
the coreData.get promise is guaranteed to settle.  Because in
PhantomJS the promise is polyfilled, and Chrome it's native, they
work slightly differently.
2020-01-29 12:30:11 -05:00
Bryan Housel
567eeac587 Make several data external instead of bundled:
Also dist/data/* contains minified files now

These are now external and will fetch as needed:
-export { dataAddressFormats } from './address-formats.json';
-export { dataDeprecated } from './deprecated.json';
-export { dataDiscarded } from './discarded.json';
-export { dataLanguages } from './languages.json';
-export { dataPhoneFormats } from './phone-formats.json';
-export { dataShortcuts } from './shortcuts.json';
-export { dataTerritoryLanguages } from './territory-languages.json';
2020-01-28 22:21:31 -05:00
Quincy Morgan
89ce98f510 Don't require services/osm in order to get max OSM character lengths 2020-01-28 09:28:23 -05:00
Quincy Morgan
6dc02d7f22 Properly hide the input field on semicombos when there aren't enough characters remaining to add another value (re: #6817) 2020-01-27 16:35:15 -05:00
Quincy Morgan
17ae12b3d7 Address most common places where tag keys or values could exceed the 255 character API limit (close #6817) 2020-01-27 15:57:55 -05:00
Quincy Morgan
361358392f Don't show yes as a suggestion for typeCombo fields 2020-01-15 10:30:38 -05:00
Quincy Morgan
40b6fe7ff9 Fix semicombo drag-and-drop issues with stale data and target positioning (re: #7024) 2020-01-10 13:59:50 -05:00
Quincy Morgan
e624106b7d Add Speed Limit Enforcement relation preset (close #7234)
Remove Name field from Enforcement preset
2020-01-10 12:19:53 -05:00
Quincy Morgan
20fd66630b Update semicombo reordering (re: #7024):
Don't try reordering multiCombo fields
Fix offset behavior for full-width semicombos
Use grab/grabbing cursor style
Keep dragged chip above others
2020-01-09 14:43:18 -05:00
Arjun
ba00334f2b drag and drop of semicombos 2020-01-06 16:00:48 +00: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
38ebef10d2 Revalidate after reversing ways via the One Way field 2019-12-06 11:04:16 -05:00
Quincy Morgan
a2ada42988 Ensure identifier field link button has proper state on init 2019-12-05 10:23:57 -05:00
Quincy Morgan
91da6028f8 Add field for wikimedia_commons tag (re: #7064) 2019-12-04 14:09:43 -05:00
Quincy Morgan
e83c0940bf Add field for ref:vatin (close #6880) 2019-12-04 11:50:10 -05:00
Quincy Morgan
6c7d8b6150 Add identifier field for tags linking features to external databases
Add US-only field for `gnis:feature_id` (close #7086)
Add tooltip to wikipedia field link button
2019-12-03 20:47:10 -05:00
Bryan Housel
16ff2b1373 Upgrade country-coder to scoped package @ideditor/country-coder 2019-12-02 13:51:04 -05:00
Bryan Housel
693661a658 Default TR to via-node only, use new key so everyone must re-choose
(closes #6922)
2019-11-11 14:47:29 -05:00
Quincy Morgan
e8e95c69e6 Replace mph.json file with country-coder implementation (re: #6941) 2019-11-08 18:48:33 +01:00
Quincy Morgan
71bfeb5a9f Fix lint warnings 2019-11-07 20:16:05 +01:00
Quincy Morgan
f45670a9a7 Don't suggest brands from incompatible countries in the Name field (close #6479) 2019-11-07 19:21:00 +01:00
Quincy Morgan
d89996e52c Update country-coder to 2.0.0 (close #7029)
Localize address field in walkthrough without overwriting country coder function
2019-11-07 18:45:46 +01:00
Quincy Morgan
8c0740191f Replace remaining nominatim countryCode calls with country-coder calls (close #6941) 2019-11-01 18:15:35 +01:00
Quincy Morgan
51dbdb4f27 Add country-coder as a dependency
Use country-coder to code addresses (re: #6941)
2019-11-01 17:03:51 +01:00
Quincy Morgan
f5995dffb0 Cherry pick crossing buildings fix 2019-10-03 20:09:49 +02:00
Quincy Morgan
1371b3cfdc Make single-key radio fields translatable like combo fields (close #6878) 2019-09-24 19:27:50 +02:00
Quincy Morgan
af4df042a7 Account for OSM using sr instead of sr-Cyrl for Cyrillic Serbian in the multilingual name field (re: #6712) 2019-08-23 09:49:22 -05:00
Quincy Morgan
5742e58ff6 Prioritize the user's language and territory languages in the multilingual name suggestion list (close #6712) 2019-08-08 16:21:06 -05:00
Quincy Morgan
39454c1b80 Lock the Name field if a feature as a name:etymology:wikidata tag (close #6683) 2019-08-08 14:55:23 -05:00