This PR introduces several improvements and fixes to how constraint status is tracked and presented. Closes #862.
Changes:
Individual constraint status trackers for:
Constraint checking status
Constraint violation status (Failed if any violations, Complete otherwise)
Number of unchecked constraints (if constraints were introduced since last constraint check)
Derive an overall constraint status based on the previously mentioned constraint statuses in addition to the simulation status. Logic is as follows:
If constraints have never been checked, status is null
Else if constraint checking is not complete, status is constraint checking status
Else if there are new unchecked constraints, status is modified
Else status is constraint violations status
Display indicators for constraint checking status, constraint violations, constraint compile errors, and unchecked constraints from within the Navbar constraint hover menu.
Use Hourglass icon (from Bootstrap) to indicate indeterminate status progress. The indeterminate prop is now supported in the StatusBadge and other related components to enable this behavior.
Display compilation errors when found for constraints
Display Modified status icon for unchecked constraints
Disable constraint checking buttons if simulation status is not complete
Fixes:
Fix computation for number of constraint violations ("I of J violations") presented in Constraints panel above the constraint list.
Testing:
Scenario A:
Make a plan with activities and valid constraints that have no violations
Ensure that the constraints in the Constraints panel display a Unchecked icon that on hover shows an "Unchecked" tooltip
Simulate
Check constraints
The constraint status in menu should indicate success
Make a change to the plan
Hover over constraint menu in the navbar, a message should be present warning the user that simulation is out of date and the check constraints button should be disabled. Note that in this PR we cannot tie constraint status to sim out of date status since we do not track constraint runs (future work).
Simulate
Hover over constraints menu in the navbar. The warning message should not longer appear and the check constraints button should be enabled.
Scenario B:
Make a plan with activities and some constraints that are invalid (i.e. won't compile) and some constraints that will cause violations.
Simulate
Check constraints
The overall constraint status should be "Failed" and hovering over the navbar constraint menu should indicate compilation errors and constraint violations.
Ensure that the invalid constraints display an Error collapsible section in the Constraints panel.
Scenario C:
Make a plan with activities and constraints
Simulate
Check constraints
Add a new constraint
Ensure that a message about an unchecked constraint appears in the navbar constraint hover menu and that the constraint in the Constraints panel displays n Unchecked status icon that on hover displays "Unchecked".
This PR introduces several improvements and fixes to how constraint status is tracked and presented. Closes #862.
Changes:
null
modified
indeterminate
prop is now supported in theStatusBadge
and other related components to enable this behavior.complete
Fixes:Testing: Scenario A:
Scenario B:
Scenario C: