Commit Graph

1608 Commits

Author SHA1 Message Date
SilentSpike 087867d5c8 Use Promises for Osmose issue detail requests
Also ES6ify the details script
2020-02-04 21:08:02 +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 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 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 406264c37e Simplify structure of QA error data 2020-02-03 23:20:42 +00:00
SilentSpike 12206c68e6 Convert Osmsoe service to ES6 syntax 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 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 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 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
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
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
Quincy Morgan 1c7a150854 Fix issue with fields in commit UI 2020-01-31 14:26:33 -05:00
Quincy Morgan 2783408fc3 Add tooltips to mixed values in semicombo, multicombo, and radio fields 2020-01-31 14:07:16 -05:00
Quincy Morgan af928e3dc1 Support radio fields during multiselections 2020-01-31 13:02:30 -05:00
Quincy Morgan 8d9adbd902 Lock the name field if any of the selected features should be locked (re: #7306) 2020-01-31 11:23:42 -05:00
Quincy Morgan b3262a71dc Use newlines instead of semicolons to separate mutliselection tag values in tooltips (re: #7306) 2020-01-31 10:49:31 -05:00
Quincy Morgan 512d8974a6 Merge branch '2.x' into multiselection-field-editing 2020-01-30 17:20:04 -05:00
Bryan Housel 6e5cb45c17 Don't bundle the imagery anymore, fetch from dist/data at runtime
(re: #4994)
2020-01-30 17:10:41 -05:00
Quincy Morgan 15e9599ff7 Support editing the Name and Multilingual Name fields during multiselection 2020-01-30 17:09:19 -05:00
Quincy Morgan 1b331bb678 Add mechanism for fields to support editing during multiselection (re: #7276)
Add `utilCombinedTags` method and use it for the raw tag editor as well as fields
Pass `entityIDs` array into fields instead of single `entity` object
Give field revertion its own path separate from `change`
Add multiselection editing to fields in files: access, address, check, combo, cycleway, input, maxspeed, textarea, and wikidata
2020-01-30 13:53:29 -05:00
Bryan Housel 33a2dafc10 Fetch wmf-sitematrix from CDN.. No need to depend on it anymore. 2020-01-30 09:48:37 -05:00
Bryan Housel fb4d658860 Don't bundle the community index anymore, fetch from CDN instead
Start fetching and preparing it just before the changeset gets sent
2020-01-29 15:24:26 -05:00
Bryan Housel c481f90e7d Stop bundling wmf-sitematrix, move it extern
This also includes a bunch of tweaks to make the tests work
in both PhantomJS and modern browsers like Chrome.

Basically - introduce some more async into the test code so that
the coreData.get promise is guaranteed to settle.  Because in
PhantomJS the promise is polyfilled, and Chrome it's native, they
work slightly differently.
2020-01-29 12:30:11 -05:00
Bryan Housel 567eeac587 Make several data external instead of bundled:
Also dist/data/* contains minified files now

These are now external and will fetch as needed:
-export { dataAddressFormats } from './address-formats.json';
-export { dataDeprecated } from './deprecated.json';
-export { dataDiscarded } from './discarded.json';
-export { dataLanguages } from './languages.json';
-export { dataPhoneFormats } from './phone-formats.json';
-export { dataShortcuts } from './shortcuts.json';
-export { dataTerritoryLanguages } from './territory-languages.json';
2020-01-28 22:21:31 -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
Bryan Housel d69cf532e0 Merge branch 'dataloader' into 2.x 2020-01-27 17:17:46 -05:00
Bryan Housel 31e007fc83 Create a data loader and move the intro graph into dist/data
(re: #3403)
2020-01-27 17:15:00 -05:00
Quincy Morgan 6dc02d7f22 Properly hide the input field on semicombos when there aren't enough characters remaining to add another value (re: #6817) 2020-01-27 16:35:15 -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
Bryan Housel 2a2668b01b Can't use ES6 fat-arrow functions with arguments
see buble bug https://github.com/bublejs/buble/issues/208
2020-01-24 17:22:03 -05:00
Quincy Morgan 7c5cbb121f Fix "Add field" label 2020-01-24 10:59:10 -05:00
Quincy Morgan 3dc0361dc8 Add improved "zoom to" icon 2020-01-22 12:43:24 -05:00
Quincy Morgan c477950556 Re-add "zoom to this" button 2020-01-22 10:44:40 -05:00
Quincy Morgan fd2b97331c Add label to "change feature type" button in inspector and make it a collapsible section (close #6811) 2020-01-22 09:19:54 -05:00
Quincy Morgan 6bb2997306 Enable changing the preset of multiple selected features (re: #7276)
Fix issue where preset tag reference wouldn't load
Change "Change feature" tooltip to more accurate "Change feature type"
2020-01-21 15:19:51 -05:00
Quincy Morgan a364c52f47 Make "Multiple Values" placeholder italic 2020-01-20 13:55:38 -05:00