Commit Graph

458 Commits

Author SHA1 Message Date
Bryan Housel
fe00a40e9a Move the keepRight data extrnal 2020-02-07 09:16:34 -05:00
SilentSpike
f8a4a0b3ad Use d3_json Promise directly for Osmose requests 2020-02-07 11:29:48 +00:00
SilentSpike
8bb2dc7fa6 Return Promise for Osmose string requests 2020-02-07 11:21:33 +00:00
SilentSpike
f86837d637 Fix use of double quotes 2020-02-06 23:12:18 +00:00
SilentSpike
51efd5b714 Update and standardise QA implementations
- ES6ify (now using class syntax to define QAItem objects)
- Fix bug with KeepRight marker rendering not updating properly
- Use `qa-` prefix for the UI element classes to differentiate from iD
validation error related UI element classes
- Move away from "error" where possible in source
- Move away from snake_case naming where possible

Note that some function/method names have been untouched to make life
easier for v3 development. Have added note comments where appropriate.
2020-02-06 23:07:50 +00:00
SilentSpike
087867d5c8 Use Promises for Osmose issue detail requests
Also ES6ify the details script
2020-02-04 21:08:02 +00:00
SilentSpike
e6cf53dfe8 Fix use of test() method on color string 2020-02-04 12:05:36 +00:00
SilentSpike
ecadafb3e4 Use Osmose supplied hex colors 2020-02-03 23:20:45 +00:00
SilentSpike
cf878ca410 Use Object.keys() not Python {}.keys() 🤦‍♂️ 2020-02-03 23:20:45 +00:00
SilentSpike
2d2fa440c1 Use multiple specific Osmose string requests
- Only requesting the data we need (Osmose has many more issue types
than iD will ever display)
2020-02-03 23:20:45 +00:00
SilentSpike
06ac02f89f Use Osmose dynamic subtitile string
Providing a `langs` param that's currently not implemented so these will
all be English until that is done.
2020-02-03 23:20:45 +00:00
SilentSpike
e3c6f58624 Format markdown in Osmose strings appropriately 2020-02-03 23:20:44 +00:00
SilentSpike
010ca30999 Show more Osmose strings in the UI
Also only add sections where appropriate
2020-02-03 23:20:44 +00:00
SilentSpike
7a00c0a974 Use Osmose locale filter and detail strings 2020-02-03 23:20:44 +00:00
SilentSpike
5d93d3cace Prepare to use Osmose issue detail strings
- Remove translation description strings, will be using supplied
translations once the API is updated
- Change the way elements and details are presented since they can't be
easily integrated into the 3rd party description strings
2020-02-03 23:20:44 +00:00
SilentSpike
7d76950d55 Use Osmose translation strings for issue titles
This is just step one in the process while we wait for the API to supply
further strings and filtering to reduce the amount of string data
requested (since we don't need it all).

Strings are requested when the layer is first enabled and cached for the
current language (plus English as a backup).
2020-02-03 23:20:43 +00:00
SilentSpike
6310349a5a Use latest Osmose API tiles endpoint 2020-02-03 23:20:43 +00:00
SilentSpike
d2f9278fe2 Port changeset tag improvement to ImproveOSM QA
Also marked the `closed:` tags as readonly since these are filled in
automatically.

- Gives a count of each error type closed instead of making a list of
joined coordinates which quickly fills the maximum value length.
- This is more useful since a changeset already gives the area worked
on while these counts give insight into the type of changes made.
- Similar to iD own validation tags
2020-02-03 23:20:43 +00:00
SilentSpike
9fca611ec1 Add support for even more Osmose error types
- Conflicting tags
- Orthographic errors (excess whitespace and all capital names)
- Deprecated tagging
- Bad use of the "area" tag
2020-02-03 23:20:43 +00:00
SilentSpike
406264c37e Simplify structure of QA error data 2020-02-03 23:20:42 +00:00
SilentSpike
a53f1c0f67 Add support for Osmose unnecessary tag error type 2020-02-03 23:20:42 +00:00
SilentSpike
c13eb15691 Add support for more Osmose error types
- Unconnected level crossings
- Unconnected highway features/barries
- Unexpected punctuation/symbols in tag values
- Unbalanced parentheses/quotes in name values
- Invalid date formats
- Access tagging that permits all transport modes
- Elements with a "name" tag and no main tagging
- Relations missing a "type" value
2020-02-03 23:20:42 +00:00
SilentSpike
cc3039033f Support more subtypes of osmose error type 8300 2020-02-03 23:20:41 +00:00
SilentSpike
12206c68e6 Convert Osmsoe service to ES6 syntax 2020-02-03 23:20:41 +00:00
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