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.
This commit is contained in:
SilentSpike
2020-02-05 14:23:34 +00:00
parent 9faf8c0fe5
commit 51efd5b714
33 changed files with 2823 additions and 3079 deletions

View File

@@ -138,7 +138,7 @@ export function uiCommit(context) {
// assign tags for closed issues and notes
var osmClosed = osm.getClosedIDs();
var issueType;
var itemType;
if (osmClosed.length) {
tags['closed:note'] = osmClosed.join(';').substr(0, tagCharLimit);
}
@@ -150,14 +150,14 @@ export function uiCommit(context) {
}
if (services.improveOSM) {
var iOsmClosed = services.improveOSM.getClosedCounts();
for (issueType in iOsmClosed) {
tags['closed:improveosm:' + issueType] = iOsmClosed[issueType].toString().substr(0, tagCharLimit);
for (itemType in iOsmClosed) {
tags['closed:improveosm:' + itemType] = iOsmClosed[itemType].toString().substr(0, tagCharLimit);
}
}
if (services.osmose) {
var osmoseClosed = services.osmose.getClosedCounts();
for (issueType in osmoseClosed) {
tags['closed:osmose:' + issueType] = osmoseClosed[issueType].toString().substr(0, tagCharLimit);
for (itemType in osmoseClosed) {
tags['closed:osmose:' + itemType] = osmoseClosed[itemType].toString().substr(0, tagCharLimit);
}
}