xstate-viz icon indicating copy to clipboard operation
xstate-viz copied to clipboard

Transition guards lack visual feedback

Open senritsu opened this issue 4 years ago • 1 comments

Compared to the old visualizer, transition guards seem to have lost quite a bit of support when it comes to communicating forbidden transitions due to false-y guards.

  • Color-coding for each guard, corresponding to evaluation result (red/green), now guards are always white
  • Transitions where guards evaluate to false were previously displayed distinct from allowed transitions (in a "disabled" style), now both look the same (highlighted in primary color, aka "click me, i'm active" 😄)

This makes it a lot harder to see the possible paths at a glance. Any chance those features are coming back?

senritsu avatar Sep 13 '21 11:09 senritsu

Yes, those features will make their way back. There are actually 3 representations:

  • Guard false (transition will not be taken due to context)
  • Guard true (transition will be taken no matter the event payload)
  • Guard unknown (transition may or may not be taken, depending what the event payload is)

I'd like to also explore a good way to determine that "unknown" case

davidkpiano avatar Sep 13 '21 13:09 davidkpiano