Replies: 3 comments 3 replies
-
Or maybe a description key for state nodes could add some visual component containing text about that node, though it's all good even now. ID on root node can act as title for a machine, and I think multiple machine tabs could be added based on ID itself. JSdoc comments won't work well with all structures (some of us like separating out our states in JSON or YAML). |
Beta Was this translation helpful? Give feedback.
-
For now, you can do this: const machine = createMachine({
// ...
meta: {
description: `# Some test machine` // any markdown
}
}); And it will display in the inspector. |
Beta Was this translation helpful? Give feedback.
-
Edit: ❌ Never mind. This changes the state identified as well not only the title. So it beaks transitions 😢 . @davidkpiano any ideas we can show different titles than the state ID? I also wanted to show a more detailed description and also replace the title.
const fetchMachine = createMachine<Context>({
// ...
states: {
theRawId: {
key: "The Nice ID", // Override theRawId
meta: {
description: "# Description\nAllows screenshots:\n![](https://upload.wikimedia.org/wikipedia/commons/thumb/b/bd/Web_Page.png/800px-Web_Page.png)"
}
},
}
}); |
Beta Was this translation helpful? Give feedback.
-
It would be nice to have a title to distinguish different machines in various tabs.
It could be jsdoc in a comment like:
that would be rendered as:
The title could also be shown in the page
<title>
.Beta Was this translation helpful? Give feedback.
All reactions