New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add description property to state and transition #2672
Conversation
|
Is this an alternative to |
You got it! I feel that |
Agree! I will add this to the parser. |
What the |
@Andarist Having autocomplete on description should be nice! And having it as a key on the event should also be handy |
@@ -647,6 +648,10 @@ export interface StateNodeConfig< | |||
* @default false | |||
*/ | |||
preserveActionOrder?: boolean; | |||
/** | |||
* A description of the state node, rendered in Markdown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably should mention here that "rendering in Markdown" applies to the XState visual tooling. It would also be nice to specify what flavor of Markdown this is interpreted as (I assume that it's GFM but could be Commonmark or something else)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the markdown part. Will specify in documentation for tooling, not here
Devs use Motivation is also here: #2672 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably deserves a small changeset - other than that: LGTM
This PR adds
description
as a top-level property for state nodes and transitions: