Commit Graph

11055 Commits

Author SHA1 Message Date
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 af45dbce10 Trying to avoid one-off validations when history changes will trigger it 2019-04-05 11:37:02 -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 82a9375e0f Move coreValidator test to test/spec/core/validator.js 2019-04-05 09:34:53 -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 68ed6da159 Merge branch 'master' into validation_and_change_perf 2019-04-04 09:30:30 -04:00
Bryan Housel 87e3b928d0 Reduce drawing during history changes
(closes #6086)
2019-04-03 23:26:26 -04:00
Quincy Morgan b52d8c1790 Add documentation for the geometry, tags, addTags, removeTags, and matchScore preset properties 2019-04-03 18:06:13 -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
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 765d765477 Pick a fake loc value where equality tests actually work 2019-04-03 17:25:10 -04:00
Quincy Morgan cbae090f08 Fix crash in almost junction validation 2019-04-03 14:23:21 -07:00
Bryan Housel 167824a530 Make sure all nodes have an actual loc property
- This is to make difference comparisons easier
- The only nodes that didn't have a `loc` were fake nodes we made for testing
- So this commit also fixes the `osmIntersection` code and tests.
2019-04-03 16:20:45 -04: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 d65298f383 Fix issue where generic vertex icon wouldn't show (close #6138) 2019-04-03 09:29:14 -07:00
Bryan Housel 561ffc402a Remove annotatedChange events (we'll replace with something else) 2019-04-03 11:56:56 -04:00
greenkeeper[bot] d40378d27d chore(package): update rollup to version 1.8.0 2019-04-03 09:53:16 -04:00
greenkeeper[bot] 8f15ea761b chore(package): update sinon to version 7.3.1 2019-04-03 09:53:03 -04:00
Quincy Morgan bf391c997a Fix issue where Points walkthrough could not be completed in some cases due to downgrade operation (re: #6103) 2019-04-02 20:23:27 -07:00
Quincy Morgan 8779e1a6dc Add Downgrade operation to remove most tags from features but retain address and building tags instead of immediate deletion 2019-04-02 11:09:08 -04:00
Quincy Morgan d5a2ca131d Fix issue with loading brand documentation (close #6134) 2019-04-02 07:21:30 -04:00
Quincy Morgan 103c533701 Add "Cycle & Foot Path" preset (re: #6070)
Offer to add "bicycle=designated" to features with "highway=cycleway" + "foot=designated" but no "bicycle" tag
2019-04-01 15:33:50 -04:00
Quincy Morgan 04e4cfc031 Flag paths with "no" access value for their implied designation (re: #6070) 2019-04-01 15:00:32 -04:00
Quincy Morgan cf6e6c7970 Always display the wikidata label and description in the user's language, if available 2019-04-01 13:04:33 -04: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
Quincy Morgan 2e7a47d0f2 Update the wikipedia tag when setting the wikidata tag via the field (close #5543) 2019-03-31 15:49:35 -04:00
Bryan Housel 1eeaca90a4 Add rollup-plugin-visualizer, but leave commented out
(this requires node 8+)
2019-03-30 10:11:00 -04:00
Bryan Housel b2831ffbd9 Don't export coreValidator here, as it's already exported by core * 2019-03-30 09:58:42 -04:00
Bryan Housel 05f0e9f76f Remove lodash isMatch
(re: #6087)
2019-03-30 09:36:24 -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 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 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
Quincy Morgan 0ca869a525 Expand preset documentation 2019-03-29 10:43:54 -04:00
Bryan Housel ba6283af98 Fix point averaging code in improveOSM service
re: https://github.com/openstreetmap/iD/commit/4a8c20c56e4549da94555958acd34f649ca18fe9#r32961438
2019-03-29 09:06:27 -04:00
Bryan Housel 01a6130751 Remove lodash merge.. also don't need esm dependency anymore
(re: #6087)
2019-03-29 01:27:38 -04:00
Bryan Housel 4a8c20c56e Remove lodash forEach
(re: 6087)
2019-03-28 19:50:20 -04:00
Quincy Morgan 5a0f8b3453 Autocomplete labels in the Wikidata field (close #5544) 2019-03-28 19:34:47 -04:00
Quincy Morgan 2728f07c84 Use depreacted.json instead of preset replacement property for landuse water features 2019-03-28 14:49:41 -04:00
Quincy Morgan 1d3b6a3483 Use large Facebook brand images instead of square 2019-03-28 14:42:12 -04:00
Quincy Morgan 3d4c5c6087 Display logos for name-suggestion-index brands in the sidebar (close #5167) 2019-03-28 14:20:46 -04:00
Quincy Morgan 0e6b5d46d6 Add Commemorative Plaque preset
Deprecate memorial=plate
2019-03-28 12:21:58 -04:00