xstate-viz
xstate-viz copied to clipboard
Transition guards lack visual feedback
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
falsewere 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?
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