734 Commits

Author SHA1 Message Date
SilentSpike
896ed762e0 Fix silent failure for some Osmose error types
When I added special handling for mapillary errors the code was trying
to access translation strings nested under the error category (which
doesn't exist for all error types). This code is now moved into it's own
function so that variable hoisting doesn't run it for non-applicable
error types and prevent them from working.

- Also adds support for error type 3040 (bad tag value)
- Updated the Osmose sidebar UI title
2020-02-03 23:20:41 +00:00
SilentSpike
a068cdfc59 Tag changeset with Osmose issue closed counts
This seems more useful than tagging with a list of joined coordinates
which quickly becomes truncated due to tag value length.

Adds a tag per issue type similar to iDs own validation.
2020-02-03 23:20:41 +00:00
SilentSpike
5afdfc527b Add support for more Osmose error types
- Missing parking access
- Malformed opening hours tagging
- Objects detected by Mapillary that aren't mapped
- Traffic sign information detected by Mapillary that isn't mapped

Mapillary errors add example code for special error type handling as
they don't need to request further details and can use piecewise
translation strings
2020-02-03 23:01:03 +00:00
SilentSpike
b24b041335 Add Osmose issue detail fetching for UI
Must fetch details per-issue to get the associated OSM elements for
highlighting and use in the error description.

Also fixes URL for error closure.
2020-02-03 23:01:03 +00:00
SilentSpike
ebd206595a Use Osmose tiles API endpoint instead of issues
- Simplifies our code a little bit
- Quick to provide and gives us the `item` + `class` without requesting
all other information (the two things needed to know the error type)
- Removed handling of associated elements for now, need to implement
fetching for that data on a per-issue basis when the UI loads
- Set things up for the possibility of using the provided translation
strings (need to determine if desirable)

See: https://github.com/osm-fr/osmose-frontend/issues/193
2020-02-03 23:01:03 +00:00
SilentSpike
680fdb6b54 Allow Osmose errors to use category for UI strings
Some error types don't require unique strings and can share common
strings among the category. This makes that possible as well as adding
support for some other types of error for demonstrative purposes.
2020-02-03 23:01:02 +00:00
SilentSpike
d9ba63aa3f Fix leftover errors and unused definitions 2020-02-03 23:01:02 +00:00
SilentSpike
1fa888069d Fix resolution request for Osmose issues
- Remove leftover code that caused undefied variable error
- Change to a GET request
2020-02-03 23:01:02 +00:00
SilentSpike
09e7b23665 Add Osmose issues UI and filtering
Filters out errors not present in the data .json file to enable
selective support since Osmose has a wide variety of errors which may be
too advanced for iD.

Also added processing for the elements associated with an error for
forced visibility and highlighting.
2020-02-03 23:01:01 +00:00
SilentSpike
e11d97b38c Add Osmose QA layer and service
Initial implementation - need to add UI for the errors and correctly set
up support for the desired error types provided by osmose.
2020-02-03 23:01:01 +00:00
Bryan Housel
b2b2689fb2 Use the ES6 export for martinez-polygon-clipping 2020-02-03 12:38:17 -05:00
Quincy Morgan
89ce98f510 Don't require services/osm in order to get max OSM character lengths 2020-01-28 09:28:23 -05:00
Quincy Morgan
17ae12b3d7 Address most common places where tag keys or values could exceed the 255 character API limit (close #6817) 2020-01-27 15:57:55 -05:00
Quincy Morgan
d6419ca791 Move OSM tile fetch callback to a named function 2020-01-16 10:29:17 -05:00
Quincy Morgan
37351e0f50 Include the number of active blocks in the OSM user object 2020-01-16 10:19:59 -05:00
Bryan Housel
c65b0a5784 Merge pull request #7188 from mmd-osm/feature/osmapijson
OSM API /map call: support Overpass JSON format
2020-01-06 22:51:11 -05:00
Quincy Morgan
08f8bce4a7 Fix some code tests 2020-01-06 15:46:02 -05:00
SilentSpike
820e86ad6c Fix ImproveOSM request payload
- Seems that the expected payload has changed so now all error types use
key "targetIds"
- Also includes minor fix so that comments display in the UI immediately
2020-01-03 19:52:13 +00:00
Quincy Morgan
0a3b3df80c Filter out values with fewer 10 or fewer uses from combo field suggestions (close #7203) 2020-01-03 11:49:43 -05:00
mmd-osm
b7ca22f41d OSM API /map call - Overpass JSON format parser 2019-12-27 20:50:47 +01:00
Quincy Morgan
e99f6f12de Update ImproveOSM overlay endpoints for transition to Grab (close #7110) 2019-12-12 10:10:44 -05:00
Quincy Morgan
4d8d27f3c4 Rely more on mapillary selected photo key than photoviewer datum
Remove mapillary map feature selection outline when closing photoviewer
2019-12-11 17:53:03 -05:00
Quincy Morgan
0d5bd8b277 Store selected mapillary image by its key rather than its object
Properly sort selected mapillary signs and features above unselected ones
2019-12-11 17:15:36 -05:00
Quincy Morgan
c1f7721197 Reload API status automatically when a response indicates a probable change in status (close #6650)
Make API status messages more informative (close #7021)
Add manual Retry button to "unable to connect" API status message (close #5864)
2019-12-05 17:17:57 -05:00
Quincy Morgan
db300d1071 Add tooltips to mapillary map features layer icons (close #7079) 2019-12-05 11:52:12 -05:00
Bryan Housel
d986d1b68d Use native Promises and drop "q" dependency, update streetside.js to es6 2019-11-08 16:24:41 -05:00
Quincy Morgan
271a4cbac7 Update rbush to 3.0.1 (close #6359) 2019-11-08 18:17:17 +01:00
Quincy Morgan
d89996e52c Update country-coder to 2.0.0 (close #7029)
Localize address field in walkthrough without overwriting country coder function
2019-11-07 18:45:46 +01:00
Quincy Morgan
51dbdb4f27 Add country-coder as a dependency
Use country-coder to code addresses (re: #6941)
2019-11-01 17:03:51 +01:00
Quincy Morgan
2576f58b14 Show uppercase suggestions in the Draft Beers field and update changelog 2019-10-21 11:15:08 +02:00
cbeddow
819ea05e6f fix: mapillary pagination and minimum detection count 2019-10-07 14:13:21 +02:00
Quincy Morgan
d7bbbd0017 Suggest uppercase target field values from taginfo 2019-09-13 08:45:51 -04:00
Quincy Morgan
a13a77562e Suggest uppercase country field values from taginfo 2019-09-13 08:40:11 -04:00
Matias Volpe
8e616d7384 feat: add Mapillary Map Features layer 2019-08-22 15:16:31 -03:00
Quincy Morgan
7d9f732753 Fix issue where Mapillary and Streetside viewers would not receive resize events (close #6286) 2019-08-22 10:19:46 -05:00
Bryan Housel
2a08868c14 Fix vector tile layers
(closes #6426)

After switching from XHR->fetch, we now parse the response separately,
so the `vtToGeoJSON` function already has an ArrayBuffer to work with.
2019-05-24 10:15:35 -04:00
Bryan Housel
0ded25885d Back off if the toLoad queue is filling up..
(re #6417)
2019-05-24 09:44:35 -04:00
Quincy Morgan
4fb4f88e5a Fix issue where only the first page of mapillary results would be shown (close #6382) 2019-05-20 12:36:12 -04:00
Bryan Housel
bdb454e1b3 Remove utilCallWhenIdle, use requestIdleCallback/cancelIdleCallback
Places where a reset or connection switch would be problematic,
we can now cancel the callbacks.
2019-05-16 22:28:56 -04:00
Bryan Housel
a8c6ab4d67 Move requestIdleCallback polyfill to id.js, remove utilIdleWorker
`utilIdleWorker` was only used one place.
It just processes a list in an idle callback.

I'm working towards removing the util functions for handling idle work.
We can still do `requestIdleCallback` work throughout the code, however
each place we use it needs to have a strategy for cancellation, which
the existing util functions don't allow for.
2019-05-16 21:19:25 -04:00
Quincy Morgan
97cb90b562 Make issue messages dynamic (close #6331) 2019-05-07 14:48:30 -04:00
Bryan Housel
d3a53309b7 Allow uppercase taginfo results for _ref tags
(closes #6324)
2019-05-07 09:32:13 -04:00
Quincy Morgan
375779882d Add ability to ignore warnings
Replace issue's array of entities with array of entity IDs
Improve issue ID hashing
2019-04-29 17:52:32 -07:00
Bryan Housel
fceb1a86f7 Merge pull request #6245 from openstreetmap/d3-v5
d3 v5
2019-04-29 15:46:08 -04:00
Bryan Housel
e981cd5dd5 Switch mapillary and openstreetcam tests to work async
- can't reliably use sinon.spy to tell whether a thing has been called,
  so we listen for events instead and check server.requests()
- make sure to request the next page before dispatching `loadedImages` so
  we can `server.respond()` to the request in the event handler if we want to
- also moves `localeDateString` in the openstreetcam service from parsing
  code to display code, because it's very slow (we can just do this for the
  images we look at, instead of all images we fetch)
2019-04-29 15:31:08 -04:00
Bryan Housel
b48a7d1e1b Workround for status errors thrown by d3-xml
Because the done callback is expecting something that has a `status` property,
(like an XHR would), we need to extract the status out of the error message.
d3-xml includes status in the error message, but we can't access the response itself.
2019-04-26 22:23:08 -04:00
Quincy Morgan
228af9a000 Move areaKeys and setAreaKeys to modules/osm/tags 2019-04-26 12:53:05 -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
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