Commit Graph

189 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
61da61d7fd Add missing button arg to modeDrawLine, ensure using current entities 2019-04-22 20:00:53 -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
2ebbb68604 Restore tooltips on rule checkboxes, separate 'tip' and 'reference'
Reference will show on clicking info button, and can contain more
useful information than a tooltip can.
2019-04-19 13:24:55 -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
0d70f0670d Better test for whether untagged entities can be deleted
Now entities can always be deleted if the user created them in the first
place.. We skip asking `operationDelete.disabled()` because there are reasons
why this may return true.

A thing that could happen before:
- User creates an untagged entity
- Quits browser and restarts iD
- Restores history
- The entity happens to be in a part of the map that hasn't been loaded yet,
  so `operationDelete.disabled()` returns true, and the issue ends up
  as a 'warning' instead of an 'error'
2019-04-16 22:56:43 -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
15e73d2836 Trying out simpler outdated_tags code, with tag diff 2019-04-14 17:25:51 -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
da1fe8343a Remove mode checking code from missing_tag, as these validate anytime
This was causing it to not immediately flag "area with no tags" as an error.
(until the user edited the area some other way)
2019-04-12 12:49:47 -04:00
Bryan Housel
569cbd1a92 entity.v can be 0, so check for === undefined instead 2019-04-11 14:40:34 -04:00
Bryan Housel
0a77a494aa Merge branch 'master' into validation_and_change_perf 2019-04-10 14:22:20 -04:00
Bryan Housel
9100ce3ee4 Don't validate vertices which extend beyond the downloaded map
(closes #5938)
2019-04-10 13:40:06 -04:00
J Guthrie
6e6ed7fad5 eslint fixes 2019-04-05 19:01:12 +01:00
J Guthrie
1328054b08 Allow for multiple invalid sources 2019-04-05 18:49:14 +01: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
Quincy Morgan
65e04acb2f Flag features that mention Google in the "source" tag (close #6135) 2019-04-04 08:32:03 -07:00
Quincy Morgan
e71b139171 Simplify almost junction validation 2019-04-03 16:41:26 -07:00
Quincy Morgan
6641f62685 Reduce duplicate code in almost junction validation 2019-04-03 15:44:45 -07:00
Quincy Morgan
cbae090f08 Fix crash in almost junction validation 2019-04-03 14:23:21 -07:00
Quincy Morgan
34792d7fbf Don't add field defaults when upgrading tags to a specific replacement 2019-04-03 10:57:42 -07:00
Quincy Morgan
d5d4323c02 Replace "Use different layers" non-actionable quick fix with actionable quick fixes for setting a higher or lower layer (close #5943) 2019-04-01 11:52:04 -04:00
Bryan Housel
3673a7c7e7 Remove lodash cloneDeep
(re #6087)

- some were able to do a different approach
    (validations/almost_junction, and settings/*)
- some were replaced with custom speedy cloners
   (in orthogonalize clonePoints and osm.js cloneNoteCache)
- some just replaced with JSON.parse(JSON.stringify()))
2019-03-29 17:18:40 -04:00
Bryan Housel
1ce4f0ad6a Remove lodash without
(re: #6087)
2019-03-25 21:56:54 -04:00
Bryan Housel
0e90167513 Remove lodash clone
(re: #6087)
2019-03-22 23:18:25 -04:00
Quincy Morgan
f114945628 Flag disconnected highway areas and multipolygons (close #6075)
Don't flag highways connected only to highway multipolygons
2019-03-21 10:13:59 -04:00
Bryan Housel
99d46e9f70 Upgrade to name-suggestion-index v2
(closes #6073)
2019-03-20 23:12:05 -04:00
Quincy Morgan
790d2e867e Flag private contact information on houses and other residential buildings (close #5850) 2019-03-20 17:14:44 -04:00
Quincy Morgan
fc7cc3177d Make conditions for being able to delete features via quick fixes the same as for the delete operation (close #6062)
Simplify some validation code
2019-03-19 12:39:41 -04:00
Quincy Morgan
374cae5a7d Add validation issue flagging ways with highway=road (close #5998) 2019-03-17 11:57:28 -04:00
Quincy Morgan
d075dac2be Add crossing=unmarked when connecting ambiguous crossings highways 2019-03-14 09:46:45 -04:00
Quincy Morgan
17087f42c8 Adding mechanism for specifying an upgrade path for deprecated presets (close #6045) 2019-03-13 17:51:12 -04:00
Quincy Morgan
fb25a44017 Generalize deprecated_tags validation to outdated_tags validation
Add check for missing addTags go outdated_tags validation (close #6043, close #6042)
2019-03-12 17:08:20 -04:00
Quincy Morgan
5ce788f6a3 Add bus_guideway as whitelisted value for checking crossing highways 2019-03-05 10:06:50 -05:00
Quincy Morgan
604ff29593 Use whitelist instead of blacklist for affected highways in crossing ways validation 2019-03-05 10:01:16 -05:00
Quincy Morgan
af5012107f Fix crash when drawing a favorite highway 2019-02-27 11:44:47 -05:00
Quincy Morgan
1f21b029fd Move tag upgrade fix to an action and add unit tests 2019-02-26 10:42:12 -05:00
Quincy Morgan
7d8453b1fb Remove service road exception for adding highway=crossing during crossing way fix (re: #5976) 2019-02-26 08:12:42 -05:00
Quincy Morgan
6aa1f86dfb Add warning for multipolygon members with no set role (close #5851) 2019-02-25 17:46:50 -05:00
Quincy Morgan
66301864c1 Fix false positive of tags suggesting area on features where other tags define the preset (close #5945, re: #5933) 2019-02-25 13:10:55 -05:00
Quincy Morgan
12b1af7002 Don't say tags imply area for tags that iD doesn't have a preset for (close #5933) 2019-02-25 12:42:39 -05:00
Quincy Morgan
7f58454958 Don't tag connection nodes of paths crossing service or track roads as highway=crossing in crossing ways quick fix (re: #5976) 2019-02-25 11:39:03 -05:00
Quincy Morgan
10e73fc15c Explicitly include certain railways for crossing validation instead of excluding some
Don't flag abandoned or razed railway crossings
2019-02-21 15:09:13 -05:00
Quincy Morgan
02d3097d8d Fix a cacheing issue 2019-02-21 13:34:51 -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
2d6c49b92b Ignore proposed features for crossings ways, almost junction, and disconnected way validations (close #5922) 2019-02-21 10:14:25 -05:00
Quincy Morgan
7da37384f1 Fix an issue where stale missing tag errors could persist when canceling drawing a new way (close #5918)
Don't show missing tags error for a feature that is still being drawn (re: #5898)
2019-02-21 09:48:46 -05:00