Commit Graph

3317 Commits

Author SHA1 Message Date
Quincy Morgan
3b19cc32fd Don't grey out the map during conflict resolution (close #6547) 2020-02-05 16:16:50 -05:00
Quincy Morgan
4194194e14 Prefix file variables in operations/orthogonalize.js with underscores
Simplify multiple disabled reasons code for circularize and orthogonalize operaitons
2020-02-05 10:10:12 -05:00
Quincy Morgan
4ff634b90f Enable the circularize operation for multiple selected features (close #7326) 2020-02-05 09:57:33 -05:00
SilentSpike
4c843f60db Merge pull request #7095 from openstreetmap/osmose
Add Osmose Q/A layer
2020-02-04 21:47:28 +00:00
SilentSpike
03a097c847 Move Osmose translation link below details box 2020-02-04 21:44:20 +00:00
SilentSpike
3745c06d62 Hide Osmose issue description if no string 2020-02-04 21:22:44 +00:00
SilentSpike
087867d5c8 Use Promises for Osmose issue detail requests
Also ES6ify the details script
2020-02-04 21:08:02 +00:00
Bryan Housel
fe5ca6867c Fix error in generating outdated_tags messgae 2020-02-04 13:00:14 -05:00
Quincy Morgan
9d31d444d0 Show only issues shared by all features on multiselection 2020-02-04 12:09:54 -05:00
SilentSpike
e6cf53dfe8 Fix use of test() method on color string 2020-02-04 12:05:36 +00:00
SilentSpike
377e99240f Add Osmose translations link to details footer
Improves structure of the details UI and introduces the use of flexboxes
for this. Does not break UI for other error services with shared classes.
2020-02-03 23:20:45 +00:00
SilentSpike
1dd65cb93e Correct Osmose UI element spacing 2020-02-03 23:20:45 +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
947f9657db Port minor QoL tweaks to other QA services
Use of MouseEnter and MouseLeave is nicer for SVGs since it won't fire
multiple times (shouldn't happen hear anyway as only one element).

Triggering redraw after forcing related elements visible causes them to
render without having to pan manually.
2020-02-03 23:01:01 +00:00
SilentSpike
af5b64a477 Allow translation with numerical token replacement
Just escapes the special regex characters when creating a new RegExp so
that numerical keys can be used (e.g. my use case of replacing an
arbitrary number of tokens from an array). Otherwise it is interpreted
as a repetition.
2020-02-03 23:01:01 +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
eb0c297bbd Rewrite the issue gathering code to not use for..of 2020-02-03 17:25:34 -05:00
Quincy Morgan
13d8c078b4 Fix weak preset check 2020-02-03 13:58:34 -05:00
Bryan Housel
4aa4686e7f Fix test failures in localized and suspicious_names 2020-02-03 12:38:17 -05:00
Bryan Housel
b2b2689fb2 Use the ES6 export for martinez-polygon-clipping 2020-02-03 12:38:17 -05:00
Quincy Morgan
b4bc5305a1 Enable the issues section for multiple selected features (close #7324) 2020-02-03 12:17:14 -05:00
Quincy Morgan
e7c3ba0fd7 Show the same fields for the same features in multiselection regardless of what order they were selected in 2020-02-03 11:13:29 -05:00
Bryan Housel
06eac7c9d0 Don't bundle the nsi brands anymore, fetch from CDN at runtime
(re: #4994)
2020-02-01 17:40:56 -05:00
Bryan Housel
743dc0a83a Don't bundle the nsi brands anymore, fetch from CDN at runtime
(re: #4994)
2020-01-31 22:07:21 -05:00
Quincy Morgan
1c7a150854 Fix issue with fields in commit UI 2020-01-31 14:26:33 -05:00