Commit Graph

63 Commits

Author SHA1 Message Date
Quincy Morgan d01bb78707 Reduce circular dependencies caused by importing from indexes, the location of the validation models, and the location of areaKeys (close #6237) 2019-04-24 13:45:59 -07:00
Quincy Morgan 34fcd01f98 Add validation warning for unsquare buildings 2019-04-23 15:50:52 -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 561ffc402a Remove annotatedChange events (we'll replace with something else) 2019-04-03 11:56:56 -04:00
Bryan Housel 7c01e63efa Remove unnecessary cloning from history walkthrough stuff
(re: #6087)
2019-03-30 09:09:33 -04:00
Bryan Housel 4a8c20c56e Remove lodash forEach
(re: 6087)
2019-03-28 19:50:20 -04:00
Quincy Morgan 6fb8fcb86b Make map pan to the location of the undone edit when undoing instead of the location of the edit before that (close #5831) 2019-03-27 18:02:21 -04:00
Bryan Housel 3d80e6505f Remove lodash chunk, groupBy
(re: #6087)
2019-03-27 16:18:41 -04:00
Bryan Housel 0edd10001e Removing more lodash: isEmpty, isNumber, some map/reduce/forEach
(re: #6087)
2019-03-27 13:32:35 -04:00
Bryan Housel 5b4aa529de Replace lodash uniq
(re: 6087)
2019-03-27 02:43:25 -04:00
Bryan Housel 5e1ff74199 Replace lodash difference, intersects, union
(re: 6087)
2019-03-27 01:22:11 -04:00
Bryan Housel 4821bf0a68 Remove lodash omit
(re: #6087)
2019-03-26 14:12:45 -04:00
Bryan Housel daaab30d13 Add workaround for Array.from when running in PhantomJS
https://github.com/openstreetmap/iD/issues/6087#issuecomment-476219308

Also added `npm run phantom` to test workarounds like this quickly
2019-03-25 12:47:55 -04:00
Bryan Housel b5c2918a24 Remove lodash without and others from history imageryUsed
(re: #6087)

I ran into some trouble here, it looks like `Array.from()` polyfill
doesn't work for Sets in PhantomJS
2019-03-24 01:50:54 -04:00
Bryan Housel 5280d07bad Remove lodash reject (re: #6087) 2019-03-23 12:51:13 -04:00
Bryan Housel 76e0d13729 Remove lodash every and filter
(re: #6087)
2019-03-23 01:22:56 -04:00
Bryan Housel 11bfeaabfc Add browser-polyfills, remove lodash assign, compact, values
(re: #6087)
2019-03-22 17:14:41 -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
Quincy Morgan 1564f73de6 Merge branch 'master' into validation 2019-02-07 20:51:21 -05:00
Bryan Housel d2735ab40c Fix misspelling 2019-02-07 13:41:06 -05:00
Quincy Morgan 77c4d41855 Restore many deletions warning with tooltip and nicer message
Add tooltips back to issues pane list
Fix crash when restoring without having loaded the edited area
2019-01-30 15:48:06 -05:00
Quincy Morgan 5b93ee0f7a Run validation upon data restore after page reload 2019-01-30 13:40:02 -05:00
Quincy Morgan 226c4f88e1 Re-run validation automatically upon merging fetched remote data into the history 2019-01-29 11:10:12 -05:00
Quincy Morgan ffe4aa09f4 Pass entity array into validators instead of changes object 2019-01-24 15:26:19 -05:00
Quincy Morgan e69f2a0389 Merge branch 'master' into validation 2019-01-23 13:15:33 -05:00
Quincy Morgan 0499a76443 Fixed an entity not found error when restoring new ways that reference unloaded nodes (closed #4108, closed #5194) 2019-01-22 12:56:37 -05:00
Quincy Morgan 536ee2e786 Validations now update instantly upon an annotated graph change 2019-01-14 15:19:00 -05:00
Quincy Morgan 11b2102761 Merge branch 'master' into validation
# Conflicts:
#	data/core.yaml
#	dist/locales/en.json
#	modules/ui/commit_warnings.js
#	modules/ui/entity_editor.js
#	modules/util/index.js
#	modules/util/util.js
#	modules/validations/index.js
#	modules/validations/many_deletions.js
#	modules/validations/missing_tag.js
2019-01-14 10:13:56 -05:00
Bryan Housel 528cbb29e1 Store the transform and selectedIDs with the rest of the history
(closes #5664)
2019-01-08 00:36:41 -05:00
Xiaoming Gao a4e1012c91 add crossing_way validation
Tests are also added and passed.

One thing to note: I had to add the tree() function to history so that I can
use the tree in the test; hope that's fine.
2018-12-19 19:23:35 -05:00
Xiaoming Gao c1e3a7396f filter validations early in history
Follow @wonga00's comment in https://github.com/openstreetmap/iD/pull/5627
2018-12-19 12:05:06 -05:00
Xiaoming Gao 07a53fe6ea Extend data model for validation issues
Add the Issues pane

1. Add a class to represent the validation issue
2. Extend the data model for an validation issue to
  (1) add a severity level field (useful for identify save-blocking issues later)
  (2) replace single entity with an array of entities (useful for issues involving multiple entities)
  (3) add a coordinates field for highlighting the location of the issue on the map
  (4) add a fixes field for possible automatic fixes

3. Update existing validation modules to use the new data model
2018-12-19 10:37:32 -05:00
Quincy Morgan 858a9606d5 Added entity display name or preset name to the disconnected highway message 2018-12-18 18:05:27 -05:00
Max Grossman 8f33a85a12 make collection.index function to handle failing tests 2018-12-17 17:16:10 -05:00
Max Grossman 96e44be69c merge 2.12.2 2018-12-13 11:22:32 -05:00
Bryan Housel 13b1a9a629 If imagery becomes invalid, remove it from imagery_used
(closes #4827)
2018-12-11 17:49:15 -05:00
Max Grossman 0a31137c78 move maprules/mapcss to a service class
ref #remote-presets
2018-09-23 18:38:01 -04:00
Max Grossman b93444de75 working on isArea-ish equivalent for mapcss selector objects
ref #remote-presets
2018-08-02 18:03:13 -04:00
Max Grossman 5b1dee3779 add tests for mapcss checks
ref #remote-presets
2018-08-02 12:47:47 -04:00
Max Grossman 2bf5eaf6e7 initial plumbing for iD validation errors
ref #remote-presets
2018-07-31 14:22:34 -04:00
Bryan Housel 6c3a02cebe Avoid lodash in hot code in coreDifference
(closes #2743, closes #4611)
2018-02-05 13:44:01 -05:00
Bryan Housel 78908bfaa1 Convert lodah-es and d3 to named imports for core 2017-09-24 22:52:12 -04:00
Bryan Housel 99a3741b0c Better isolation of services, to avoid hitting network during test runs
1. All services are disabled in testing now to prevent network accesses
2. Only services are enabled when needed to test something
3. Many changes throughout code to allow iD to run with services disabled
   (e.g. check for osm service instead of assuming context.connection() will work)
4. Actually export the services so we can disable and enable them
2017-08-09 22:04:09 -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 2e81e71859 Add history.toIntroGraph() for saving the edited introGraph to JSON 2017-04-04 02:00:01 -04:00
Bryan Housel 833a67f399 Allow history to set checkpoints and reset to them 2017-03-22 22:05:27 -04:00
Bryan Housel ddd1b7e43a Don't change history state while in transition 2017-01-04 17:37:29 -05:00
Bryan Housel eb0cdd5e8c History transition code cleanup 2016-12-23 17:18:28 -05:00