Bryan Housel
fceb1a86f7
Merge pull request #6245 from openstreetmap/d3-v5
...
d3 v5
2019-04-29 15:46:08 -04:00
Quincy Morgan
228af9a000
Move areaKeys and setAreaKeys to modules/osm/tags
2019-04-26 12:53:05 -07:00
Quincy Morgan
ecc217f5d8
Add validation rule to flag impossible oneway highways and waterways ( close #6216 )
2019-04-26 12:04:43 -07:00
Bryan Housel
b99be67169
When calling an errback from a Promise.catch, pass err.message
2019-04-25 21:58:36 -04:00
Quincy Morgan
7d29a98a14
Add subtype to some validation issues
2019-04-25 10:35:27 -07:00
Quincy Morgan
aa91c2d768
Move old multipolygon warning into Outdated Tags rule ( close #6218 )
2019-04-24 15:46:50 -07:00
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
e6bc9d9e8f
Swap out d3-request, swap in d3-fetch
2019-04-24 16:25:25 -04:00
Quincy Morgan
34fcd01f98
Add validation warning for unsquare buildings
2019-04-23 15:50:52 -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
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
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
81127d71f3
Cache disabled() results in straighten action for consistent response
...
What could happen was:
- user could right click on a line
- this would trigger `disabled()` checks for each operation buttons
- the line was not fully downloaded, so would return `disabled()` 'not_downloaded'
(and also start download of the missing tiles)
- then the tooltip would pop into existence, calling `tooltip()`
- which calls `disabled()` again
- but this time it's fine and the `disabled()` is false
- so you'd see a greyed out button but the tooltip said everyting is ok and
you can click the button anyway
I fixed this by just caching the disabled test. This is probably ok anyway
because these tests can be expensive, and then the user will see a consistent
message like "The line is not yet fully downloaded".
If the user clicks off the line and back onto it, iD will reenter select mode,
rebuild the menu, redo the disabled test, and they will see the button enabled.
2019-04-10 10:19:23 -04:00
Bryan Housel
e30090996b
Add loadTileAtLoc to fetch data tile for a specific location
...
(closes #4890 )
This lets iD request needed tiles outside of the viewport, for example to
properly straighten lines or validate features that may have unloaded
connections.
2019-04-09 23:49:31 -04:00
Bryan Housel
95a1bbaf97
Add downloaded debug flag and visualization for tiles downloaded
2019-04-08 22:06:47 -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
207cbd30dc
Pacify eslint
2019-04-08 12:33:19 -04:00
Bryan Housel
7556df7265
Make sure to return the current version of entity from tree.intersects
...
Since d5e427289 , the tree head graph will not update if only tags have
changed - it requires an addition, deletion, or geometry change.
This makes the tree a little more efficient, but we do need to make
sure to return the current entities to the caller.
2019-04-08 12:28:02 -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
f17ebee402
Use Set, simplify util functions to collect entities with children
2019-04-05 11:05:04 -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
d5e427289f
Avoid delete/reinsert on the coreTree when not needed
...
(re: #6140 )
2019-04-04 10:02:15 -04:00
Bryan Housel
86de378de5
Add didChange object to track what kind of things changed in the diff
2019-04-03 17:43:04 -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
cda8f657ac
Swap fast-deep-equal for lodash isEqual
...
(re: #6087 )
2019-03-29 22:17:29 -04:00
Bryan Housel
d5abe468b9
Remove rest of the lodash iterators: map, reduce, forEach
...
(re: #6087 )
2019-03-29 15:14:21 -04:00
Bryan Housel
0d79e3e616
Remove lodash cloneDeep and forOwn from context.js
...
(re: #6087 )
Tests in Phantom run twice as fast now!
2019-03-29 12:57:37 -04:00
Bryan Housel
4a8c20c56e
Remove lodash forEach
...
(re: 6087)
2019-03-28 19:50:20 -04:00
Bryan Housel
d18b951c67
Remove lodash flatten and flattenDeep
...
(re: #6087 )
2019-03-28 10:04:46 -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