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
Bryan Housel
7e04175559
Add Enable All / Disable All validation rules links
...
(closes #5986 )
2019-04-23 13:01:15 -04:00
Bryan Housel
3fe9d75f35
Fix issues with issue cache for entities that no longer exist
2019-04-22 19:35:23 -04:00
Bryan Housel
b5c5a00abc
Get rid of the many_deletions validation 🔪
...
It just doesn't fit in with all of the other validations that work on
entities, and it's not an actionable warning anyway.
https://github.com/openstreetmap/iD/pull/6140#issuecomment-483014618
2019-04-19 13:33:29 -04:00
Bryan Housel
ca02f7ed06
Must use context.graph to validate entities instead of validatedgraph
...
This is because all the validators use it, and it's the right thing to do.
As entites load from the OSM or are restored from history, the most
updated version of them will be in context.graph, not validatedGraph
2019-04-19 10:00:38 -04:00
Bryan Housel
a56c1af725
pacify eslint
2019-04-18 19:26:05 -04:00
Bryan Housel
0eed80e1d2
Persist disabled rules in localStorage
2019-04-18 17:30:55 -04:00
Bryan Housel
7c8a6eac9d
Reintroduce disabled rules
...
- They still run, but results are excluded from lists
- Also make sure to revalidate/dispatch/update when toggling rules
2019-04-18 17:05:33 -04:00
Bryan Housel
9c4881cade
Change autofix to accept arguments to perform, implement "fix all"
2019-04-17 17:51:29 -04:00
Bryan Housel
d6327aec56
Make reference function optional
...
Now it shows the "No documentation available" message if there is not one
2019-04-17 09:05:05 -04:00
Bryan Housel
01d2e3eaf3
Replace validator tooltip with reference function, add tag diff
2019-04-16 17:07:53 -04:00
Bryan Housel
294ce00211
substitute 'info' for 'data' (so I can use 'info' for an info drawer)
2019-04-15 16:56:21 -04:00
Bryan Housel
5a0f21fa7a
Add ability for a fix to be auto, and add auto fix buttons
...
This also changes some of the list items that were previously buttons to divs,
since we can't nest buttons.
2019-04-13 10:50:47 -04:00
Bryan Housel
ce89d7359b
Sort issues list by dist from the map center, cutoff at 1000 items
2019-04-12 14:26:05 -04:00
Bryan Housel
efcd6b6bc2
Consolidate idle functions into idle.js, defer validation after merge
2019-04-12 10:49:21 -04:00
Bryan Housel
35049ab40a
Replace getErrors/getWarnings with getIssues/getIssuesBySeverity
...
The idea here is that the validator will now hold onto lots of issues,
but the calling code will only want some small subset of them
(edited/everything) (inview/everywhere) and can pass these as options
so that we don't need filtering code spread throughtout the app.
2019-04-11 14:48:23 -04:00
Bryan Housel
df1a2ea361
Prevent some actions on features that extend beyond the loaded map
...
(closes #2248 )
2019-04-08 21:26:58 -04:00
Bryan Housel
8d66289cba
Run validation when switching fields, or when applying an issue fix
2019-04-07 23:10:20 -04:00
Bryan Housel
e377270372
WIP: introduce validatedGraph, try on mode change not history change
2019-04-06 13:39:19 -04:00
Bryan Housel
1bcc0f613c
WIP: fix caches, replace id() function with plain id property
2019-04-05 17:41:04 -04:00
Bryan Housel
78acd999c8
WIP: switch from validating everything to validating differences
2019-04-05 13:29:57 -04:00
Bryan Housel
6508edf820
Avoid anonymous functions as validators
...
Givnig them names makes it easier to understand in the profiler
2019-04-05 09:50:22 -04:00
Bryan Housel
8b1c0551cc
WIP: understand state held by the validator, avoid translations
...
- Make sure all state variables prefixed with `_`
- Add explicit `init`/`reset` methods
(graph/entity refs should never persist through a save to OSM)
- Thinking of how best cache validation results
2019-04-05 09:28:36 -04:00
Bryan Housel
d18b951c67
Remove lodash flatten and flattenDeep
...
(re: #6087 )
2019-03-28 10:04:46 -04:00
Bryan Housel
5b4aa529de
Replace lodash uniq
...
(re: 6087)
2019-03-27 02:43:25 -04:00
Bryan Housel
76e0d13729
Remove lodash every and filter
...
(re: #6087 )
2019-03-23 01:22:56 -04:00
Quincy Morgan
4addd0e216
Add presets for basic indoor features ( close #6082 )
...
Don't use deprecated presets to determine area keys
2019-03-22 11:40:03 -04:00
Quincy Morgan
87e48bc543
Run missing role validation before missing tag
2019-02-25 18:01:34 -05:00
Quincy Morgan
b8ac9a7de3
Add toggle-able list of rules to the Issues pane ( close #5979 )
...
Toggling a rule off prevents the validation from running
2019-02-25 15:31:05 -05:00
Quincy Morgan
7936266a7a
Improve validation performance by avoiding uniqueWith lodash function
...
Replace map lodash function with JavaScript array map in validator.js
2019-02-21 12:13:27 -05:00
Quincy Morgan
51972ea78f
Cache issues in crossing ways validation to avoid checking the same pairs twice
2019-02-21 11:49:31 -05:00
Quincy Morgan
aa992ed981
Improve validation performance by cacheing the issue id
2019-02-21 10:47:57 -05:00
Quincy Morgan
1821c3e955
Update fixes UI for icons, link styling, and non-actionable fixes
...
Fix several bugs
2019-02-14 15:56:04 -05:00
Bryan Housel
c4fe42653a
s/coordinates/loc and replace legacy names in tests
...
In iD codebase `loc` is usually a single coordinate pair
and `coordinates` is usually an array of pairs
2019-02-12 21:18:25 -05:00
Bryan Housel
448fe498bd
Only recenter view if necessary, select after delay, fix maprules type
2019-02-12 17:25:54 -05:00
Bryan Housel
14896b0ce5
Documentation, and move validation type up to top of each file
2019-02-12 16:07:08 -05:00
Bryan Housel
9ebc9a22e9
perf: use Object instead of Array for lookup, cache on osmEntity.key
2019-02-12 14:23:50 -05:00
Bryan Housel
4e6ade08b1
Comment out cache in getIssuesForEntityWithID
...
It seems like entity editor draws before the validator runs so the
rendered list is often one history change behind.
2019-02-12 00:22:24 -05:00
Bryan Housel
c083d1d0af
More nitpicky code formatting issues
...
- no multiline var declarations
- avoid lodash unless necessary
- linefeeds for readability
2019-02-11 14:51:21 -05:00
Quincy Morgan
47ec58e5fc
Don't zoom to the end vertex when continuing a disconnected highway if it is already visible
...
Add separate fixes for continuing a disconnected highway from the start and end vertices
Highlight the vertex that will be continued
2019-02-11 11:29:34 -05:00
Quincy Morgan
d70c02ee6d
Replace use of Set object in validator
2019-02-08 09:33:17 -05:00
Quincy Morgan
d3946894e8
Standardize deprecated_tag and missing_tag rule type ids
...
Run crossing_ways before disconnected_way
Break out crossing_ways issue creation into a separate function
2019-02-04 16:29:29 -05:00
Quincy Morgan
bfb5285dc9
Fix tests and lint warnings
2019-02-04 13:34:27 -05:00
Quincy Morgan
2677a88df4
Zoom to ways and relations upon clicking on their issues in the issues pane
2019-02-04 10:27:35 -05:00
Quincy Morgan
9785021f44
Rename simpleMultipolygon functions to oldMultipolygon
...
Return old_multipolygon validation issues for the relations as well as the outer ways
Remove console logging
Don't run missing_tag validation for relations with old_multipolygon issues
2019-02-01 15:19:28 -05:00
Quincy Morgan
973697b8ba
Run all validators in the validations folder if not manually run
...
Remove ValidationIssueType and ValidationIssueSeverity objects
2019-02-01 13:38:17 -05:00
Quincy Morgan
46f3cea33a
Reorganize validation code
...
Rename IssueManager to coreValidator
Rename disconnected highway to disconnected way
Rename highway almost junction to almost junction
Rename mapcss checks to maprules
Rename deprecated tags to deprecated tag
2019-02-01 11:20:51 -05:00