disarm-dev / douma-app

DiSARM app (2018 and beyond)
MIT License
3 stars 1 forks source link

[monitor] legend for response-point colouring #118

Open onlyjsmith opened 6 years ago

onlyjsmith commented 6 years ago

Not sure how we'd do this dynamically....

We've got a status and a sprayed_status property in the config (see locational/douma-app#106), but not sure how the colours of the points are determined - whether they come from the status property, or somewhere else.

Nicolaidavies commented 6 years ago

I recommend that we don't do this now, but wait and come up with a better solution later.

The status decorator is a special decorator we only use to color the response points.

There is no information tying them to a certain status, it just contains a condition for a certain color. We don't have any information to show a description for a color.

  1. We could hardcode the descriptions into the app (green: sprayed, yellow: partial, red: not sprayed)
  2. We could can change the decorators and add a new property that is a description. Will need to look into internals of decorators and make sure we don't break anything.
onlyjsmith commented 6 years ago

We're effectively calculating sprayed_status twice - we use the same rules to compute two different properties which are different representations of the same value.