Commit Graph

1499 Commits

Author SHA1 Message Date
Bryan Housel
147af19626 Seed presetIndex collection with fallback presets
- amazingly, this passes all tests, but iD ends up pretty non-functional
2020-02-05 12:21:33 -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
Bryan Housel
a333a341ec Don't require areaKeys to be setup for actionSplit tests to pass 2020-02-04 15:45:11 -05:00
Bryan Housel
6b2d236ecd Pass in the validator to the function 2020-02-03 17:40:56 -05:00
Bryan Housel
cd5c3c54a4 Fix uiFieldWikipedia tests
- should be `iD.data.wmf_sitematrix` not `iD.data.wikipedia`
2020-02-03 17:26:04 -05:00
Bryan Housel
4aa4686e7f Fix test failures in localized and suspicious_names 2020-02-03 12:38:17 -05:00
Bryan Housel
06eac7c9d0 Don't bundle the nsi brands anymore, fetch from CDN at runtime
(re: #4994)
2020-02-01 17:40:56 -05:00
Bryan Housel
743dc0a83a Don't bundle the nsi brands anymore, fetch from CDN at runtime
(re: #4994)
2020-01-31 22:07:21 -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
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
6a4a1d57a7 Make a separate build:legacy target that runs buble
- `iD.js` for most browsers, `iD.legacy.js` for IE11/PhantomJS
- Skip buble plugin during normal development for faster builds
2020-01-21 15:25:10 -05:00
Quincy Morgan
73e64b2d7e Update code test 2020-01-18 12:27:50 -05:00
Quincy Morgan
7700fac66a Update test label wording 2020-01-15 14:31:19 -05:00
Quincy Morgan
41355bf2a0 Rename "visible" property of presets to "addable" (re: a06ec59514b30a52601e3614ef69006d2dc1bc91) 2020-01-15 14:29:45 -05:00
Quincy Morgan
5011039087 Clarify some variable names in osmEntity.deprecatedTags and add more code tests 2020-01-09 09:49:31 -05:00
Quincy Morgan
dd5a164f18 Remove references to nonexistent code tests 2020-01-06 15:31:28 -05:00
Quincy Morgan
31941e9389 Fix JavaScript error that could cause validation warnings to appear unexpectedly (close #7166)
Add code test to account for deprecated tags with no replacement
2019-12-31 12:03:57 -05:00
Quincy Morgan
8818bf1b1c Fix code tests to represent moved multipolygon line classes behavior 2019-12-11 18:05:26 -05:00
Quincy Morgan
0d5bd8b277 Store selected mapillary image by its key rather than its object
Properly sort selected mapillary signs and features above unselected ones
2019-12-11 17:15:36 -05:00
Bryan Housel
b9f41bb48c Add workaround for missing ArrayBuffer.isView in PhantomJS
(closes #7072)
2019-11-27 10:53:24 -05:00
Quincy Morgan
81b561fffc Don't close unclosed multipolygon parts with fewer than three nodes when generating geojson
Update multipolygon geojson code tests
2019-11-22 17:01:51 -05:00
Quincy Morgan
95a14ea722 Add unit test for single-member multipolygon collapse behavior exception for conflicting tags in actionJoin (re: f7d8c51bd3) 2019-11-21 12:54:59 -05:00
Quincy Morgan
4297b0d95b Add unit test for single-member multipolygon collapse behavior in actionJoin (re: f7d8c51bd3) 2019-11-21 11:20:56 -05:00
Quincy Morgan
24c72b64d1 Load issue fixes dynamically instead of cacheing them (close #7037) 2019-11-13 14:35:01 -05:00
Katarzyna Król
48ccc7900e improve checking circularity and unit tests 2019-10-29 22:51:05 +01:00
Bryan Housel
3886f2dad8 Merge branch '2.15-building-crossing-layers' into 2.x 2019-10-24 15:15:06 -04:00
Quincy Morgan
a3d6097d40 Rename "Fix Me" Requests validation rule to more general Help Requests
Add subtypes to almost_junction and disconnected_way validation rules
Add additional validation documentation (re: #6100)
2019-10-09 15:00:28 +02:00
Quincy Morgan
badde3d583 Add warning for features with names that equal values in their not:name tag (close #6411) 2019-10-04 11:06:27 +02:00
Quincy Morgan
d3d2cbb4a2 Update code tests for building layer crossings 2019-10-03 20:10:20 +02:00
Quincy Morgan
525916da74 Recategorize tags_suggests_area validation rule into mismatched_geometry rule
Warn about points tagged as vertices and vertices tagged as points (close #6319)
2019-09-26 10:56:30 +02:00
Quincy Morgan
516570739c Fix node reverse code test
Add more code tests for reversing nodes
2019-09-18 13:13:44 -04:00
Quincy Morgan
c229326aad Allow using the Reverse operation on directional nodes (close #6850) 2019-09-17 10:57:55 -04:00
Quincy Morgan
76fb12c5f5 Merge branch '2.15' into feat-mapillary-map-features 2019-08-26 14:22:17 -05:00
Bryan Housel
2fd6359505 Boost matchScore if additional matches occur in addTags
(closes #6802)
2019-08-26 12:53:03 -04:00
Matias Volpe
8e616d7384 feat: add Mapillary Map Features layer 2019-08-22 15:16:31 -03:00
Bryan Housel
392a242c02 Upgrade to eslint v6.0.0
(closes #6567)
2019-06-29 11:35:57 -04:00
Quincy Morgan
1ed73b6531 Convert validation rules to validate against a specific graph, not always the current graph (re: #6459) 2019-06-06 16:27:31 -04:00
Quincy Morgan
14c0809426 Fix issue where cuisine -> diet upgrades could overwrite existing values (close #6462) 2019-05-31 08:25:29 -04:00
Quincy Morgan
94a47f05de Add tests for the indoor, piste, and aerialway map feature categories 2019-05-24 11:02:45 -04:00
Quincy Morgan
43cd46f046 Prevent Chrome autofill of recent values in the Allowed Access inputs (close #6414) 2019-05-24 09:30:06 -04:00
Quincy Morgan
0dfd0612b1 For ice rinks, prefer the "sport" values "ice_hockey" and "ice_skating" instead of "hockey" and "skating" since that latter are ambiguous
Don't remove other values when upgrading a tag value within a semicolon-delimited list
2019-05-23 15:39:15 -04:00
Quincy Morgan
2232d7dadf Fix code tests 2019-05-22 11:59:48 -04:00
Quincy Morgan
6260cdbb8f Fix several lint warnings 2019-05-22 10:48:39 -04:00