Commit Graph

11137 Commits

Author SHA1 Message Date
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 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 8afd8887cf Restyle much of the issues and entity issues - avoid tooltips 2019-04-16 12:33:48 -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 f6708fd84c Hide feature if _all_ rules hidden (was: if _any_ rule hidden)
This matters as we start to match more rules for hybrid features like rail
platforms, which now match both path and rail.  We want to show them unless the
user has hidden all the rules that they match.

Also this changes the test code slightly to actually test rule matching.
Before it was really just testing hiding.
2019-04-15 10:20:58 -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 ce89d7359b Sort issues list by dist from the map center, cutoff at 1000 items 2019-04-12 14:26:05 -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 0ec9cd91dc Warm up the feature matching cache upon merging fetched data
Also rename `_features` to `_rules`, since we use the word features too much
2019-04-12 12:25:37 -04:00
Bryan Housel 36d1f3701f Allow osm service tests to work with deferred parsing 2019-04-12 12:11:35 -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 2b050549eb Avoid reflow in minimap by hardcoding its dimensions 2019-04-11 21:05:04 -04:00
Bryan Housel 31b64f253c Rerun validation when assigning a preset 2019-04-11 15:11:29 -04:00
Bryan Housel 96c277f46d Simplify issue-options css 2019-04-11 14:59:32 -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 569cbd1a92 entity.v can be 0, so check for === undefined instead 2019-04-11 14:40:34 -04:00
Bryan Housel 4c563f4edf Add validation options
Check:  [] My Edits  [] Everything
Where:  [] In View   [] Everywhere
2019-04-11 11:55:17 -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
Bryan Housel f309e925d8 Memoize disabled for all the other operations too
see 81127d71f
2019-04-10 11:28:41 -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
Quincy Morgan df7a2f978e Use highway tags for golf paths and cart paths (close #6165)
Offer to upgrade golf paths missing highway tags
2019-04-09 19:07:00 -07:00
Quincy Morgan 89d8f887be Allow disconnecting multiple selected vertices at once (close #6164) 2019-04-09 14:04:52 -07:00
Quincy Morgan 60ce58694c Add Screens field to Cinema preset 2019-04-09 09:53:31 -07:00
Quincy Morgan ae80c88f37 Render relation route icon lines dynamically (close #5926) 2019-04-08 19:58:50 -07: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
Quincy Morgan b01f57f9c6 Add Convention Center and Events Venue presets
Update icon for Party Store preset
2019-04-08 17:11:03 -07:00
Quincy Morgan 9c6974c8f4 Add more preset icons 2019-04-08 14:11:55 -07:00
Quincy Morgan 5445f468b8 Add more preset icons 2019-04-08 13:15:36 -07:00
Bryan Housel 2660a8554b Add isDataLoaded and tilecache rtree for testing
(re: #2248, #5938, maybe others)
2019-04-08 15:59:42 -04:00
Quincy Morgan 5f60efacd5 Add Data Center preset 2019-04-08 11:39:43 -07:00
Quincy Morgan 50a0982d79 Merge pull request #6161 from jguthrie100/fix_closed_way_disconnect
Leave way as closed when disconnecting
2019-04-08 11:08:33 -07:00
Quincy Morgan 8d313677fd Add leisure=swimming_area preset 2019-04-08 09:53:01 -07:00
Quincy Morgan 4833f96dbb Merge branch 'master' of https://github.com/openstreetmap/iD 2019-04-08 09:47:32 -07:00
Quincy Morgan e1d4528a95 Add or update various preset icons
Deprecate shop=luggage and shop=bag
2019-04-08 09:46:28 -07: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
J Guthrie 00c7eaddc2 Fix to work with PhatomJS 2019-04-08 17:07:12 +01:00
J Guthrie bd44cec2e8 Fix broken testcase! 2019-04-08 16:48:27 +01:00
J Guthrie ac29803b6f Fix eslint error 2019-04-08 16:38:10 +01:00
J Guthrie 4d24db597e Small refactor to improve efficiency 2019-04-08 16:28:01 +01:00
Jamie Guthrie a29da38230 Remove operationDisconnect test 2019-04-08 16:02:31 +01:00
Jamie Guthrie d3d0a560eb Remove excess whitespace 2019-04-08 16:01:08 +01:00
J Guthrie 57a0358061 Add test cases 2019-04-08 15:19:21 +01:00
Bryan Housel dcd2b4dfbe Update name-suggestion-index to v2.0.1 2019-04-08 09:43:00 -04:00