NeoLegends/velocity-pwa

Enhance slot icon regarding "`null`" and "0%" charging states

Closed this issue · 1 comments

This issue addresses the following two (not too rare) events:

  • The current charging level cannot be retrieved (null):
    Due to const chargePercentage = Math.round((slot.stateOfCharge || 0) * 100);, this is currently treated like 0% charging level at the moment. In the past the icon dropped down:
    2019-03-24 17 45 33
    It may be enough to treat it like the next case or we could introduce a ❓emoji.
  • The charging level is 0%:
    image
    The bike is therefore possibly out of order: In my opinion a more alarming icon could be beneficial in this special case. An emoji like ❌ could be fitting.

I think the red flash symbolizes an erroneous case good enough. For UI consistency I'd very much like to keep the current behavior where we use 0% for null%.

Another option I'd be kinda okay with is to just hide the bikes with a charge state of null. Since the bikes are operable in principle, however, we'd hide bikes that you could have rented out. Therefore I'm closing this for now.