Extend data model for validation issues

Add the Issues pane

1. Add a class to represent the validation issue
2. Extend the data model for an validation issue to
  (1) add a severity level field (useful for identify save-blocking issues later)
  (2) replace single entity with an array of entities (useful for issues involving multiple entities)
  (3) add a coordinates field for highlighting the location of the issue on the map
  (4) add a fixes field for possible automatic fixes

3. Update existing validation modules to use the new data model
This commit is contained in:
Xiaoming Gao
2018-12-18 20:03:57 -05:00
committed by Xiaoming Gao
parent 0d0521c936
commit 07a53fe6ea
14 changed files with 225 additions and 80 deletions
+6 -3
View File
@@ -281,9 +281,12 @@ export function coreHistory(context) {
validate: function(changes) {
return _flatten(_map(Validations, function(fn) {
return fn(context)(changes, _stack[_index].graph);
}));
return _flatten(_map(
_filter(Validations, _isFunction),
function(fn) {
return fn(context)(changes, _stack[_index].graph);
}
));
},