Commit Graph

165 Commits

Author SHA1 Message Date
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
Bryan Housel
919687d2cf Replace legacy names still used in tests, remove the legacy exports 2020-02-21 23:12:25 -05:00
Bryan Housel
e19bcb77d5 Require init() call before coreContext starts doing things
(closes #7304)
2020-01-29 19:27:12 -05:00
Bryan Housel
9154a6a554 context.asset should pass-through absolute URLs 2020-01-29 15:22:06 -05:00
Bryan Housel
89724cfb1b Remove support for debug rendering of the community index
We have http://openstreetmap.community now for this, and it eliminates
another place in the code where that data would have been needed.
This commit also ES6ifies svgDebug.
2020-01-29 13:35:25 -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
Bryan Housel
ce7cac6738 Move all the build scripts into scripts/ folder, ES6ify more stuff 2020-01-28 15:00:23 -05:00
Bryan Housel
6d81a00daf Let caller modify the coreData fileMap, and add tests 2020-01-28 10:27:45 -05:00
Bryan Housel
511f8ecc82 Allow user to adjust the threshold for the unsquare building warning 2019-05-18 15:44:29 -04:00
Bryan Housel
86c6805cf7 Optionally include ids members of modified relations in extantIDs
(closes #6273)
2019-05-08 13:53:48 -04:00
Bryan Housel
b0d5f0dd48 Include multipolygon members in complete()
(closes #3613)
2019-05-08 00:49:33 -04:00
Quincy Morgan
375779882d Add ability to ignore warnings
Replace issue's array of entities with array of entity IDs
Improve issue ID hashing
2019-04-29 17:52:32 -07:00
Bryan Housel
0dd262d1dd Don't dispatch 'change' on history.merged, dispatch 'merge' only
Change performs an expensive immediate redraw, and merge can schedule
a redraw for later.
2019-04-12 09:56:18 -04:00
Bryan Housel
95a1bbaf97 Add downloaded debug flag and visualization for tiles downloaded 2019-04-08 22:06:47 -04:00
Bryan Housel
82a9375e0f Move coreValidator test to test/spec/core/validator.js 2019-04-05 09:34:53 -04:00
Bryan Housel
0c7d98673a Fix form of chai not called assertion 2019-03-25 10:03:27 -04:00
Bryan Housel
6da2ba7b9d Make sure pause/resumeChangeDispatch can be called multiple times 2019-03-06 15:41:12 -05:00
Bryan Housel
0ea69548ea Add history.pauseChangeDispatch / history.resumeChangeDispatch
To avoid dispatching change events at improper times
2019-03-06 15:41:12 -05:00
Bryan Housel
e64693eea5 Upgrade tests from legacy iD.Difference to iD.coreDifference 2019-03-01 16:03:21 -05:00
Bryan Housel
71b2d2c6b7 Upgrade legacy symbols in tests
- iD.Context -> iD.coreContext
- iD.Graph -> iD.coreGraph
- iD.Node -> iD.osmNode
- iD.Way -> iD.osmWay
- iD.Relation -> iD.osmRelation
2019-01-30 15:43:02 -05:00
Bryan Housel
1ffca3ce85 Switch crossing presets to "marked"/"unmarked", retain "zebra" as unsearchable 2018-10-02 17:01:04 -04:00
Bryan Housel
12f7f68dda Fix debug flag test 2018-04-07 22:23:37 -04:00
Bryan Housel
6644c9db6b Fix context.js and vertices.js tests 2017-12-15 18:17:12 -05:00
Bryan Housel
b3842d97f4 Remove lodash from the test suite
(closes #4378)
2017-10-18 14:37:39 -04:00
Bryan Housel
ef95db8524 Add ability to history.pop n times
This is a little better than just calling pop a bunch of times because
it avoids dispatching extra history change events
2017-05-03 16:03:56 -04:00
Bryan Housel
2ebfcd174e Don't redo into un-annotated edit states
(closes #4006)
2017-05-03 00:21:37 -04:00
Bryan Housel
833a67f399 Allow history to set checkpoints and reset to them 2017-03-22 22:05:27 -04:00
Bryan Housel
9ba610a977 Add test for transitioned history.perform 2017-01-04 16:06:09 -05:00
Bryan Housel
9b7d79a3fe Use live bound object for presets object, change context.presets() getter 2016-11-14 15:44:02 -05:00
Bryan Housel
f800e5afbc Remove unnecessary window parameter to Context 2016-11-10 15:19:03 -05:00
Bryan Housel
b5c95af3b7 Refactor from coreConnection to serviceOsm
(closes #3497)
2016-10-19 09:25:34 -04:00
Bryan Housel
07fa5fcc34 Refactor Entity, Node, Relation, Tags, Way from core to osm 2016-10-11 22:41:24 -04:00
Bryan Housel
fd742518c6 Run all the tests 2016-10-11 15:31:11 -04:00
Bryan Housel
acd851b75a Merge branch 'lane' of https://github.com/kepta/iD into kepta-lane 2016-10-11 10:51:03 -04:00
Bryan Housel
87950fd472 Fix lib export, flatten names in tests and docs 2016-10-04 21:56:09 -04:00
Bryan Housel
a74157cb71 Add test for nonnumeric layer tag (see #3405) 2016-10-01 10:33:13 -04:00
Kushan Joshi
4c996b9b42 refactor none to null 2016-09-13 19:53:02 +05:30
Kushan Joshi
cb670ccdc4 add test cases for bicycleway 2016-08-22 18:17:12 +05:30
Kushan Joshi
c95df1c830 restructure lanesArray 2016-08-21 04:04:42 +05:30
Kushan Joshi
ce948f7563 modify test cases to adjust lanes != total lane count 2016-08-21 03:35:52 +05:30
Kushan Joshi
9f76267152 add psv, hov, hgv , bicycle lanes 2016-08-21 02:34:47 +05:30
Kushan Joshi
856f6618d9 format test cases 2016-08-20 18:34:50 +05:30
Kushan Joshi
80d2000291 add test cases for maxspeed & maxpseed:lanes 2016-08-20 18:32:35 +05:30
Kushan Joshi
51c0670a57 add maxspeed 2016-08-19 03:22:34 +05:30
Kushan Joshi
9a1c68f2b5 interim 2016-08-16 19:01:54 +05:30
Kushan Joshi
94b40cdfd0 add turn lanes 2016-08-16 16:04:33 +05:30
Kushan Joshi
24592f8b0a add test cases for lanes array 2016-08-06 16:21:14 +05:30
Bryan Housel
a85bad8c8c Restructure lane data (cherry pick) 2016-07-31 23:53:07 -04:00