Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Feature: Custom State Title/Names (AKA keyText) overriding the unique identified in visualizer #400

Open
Glavin001 opened this issue Jan 8, 2023 · 0 comments

Comments

@Glavin001
Copy link

Glavin001 commented Jan 8, 2023

See statelyai/xstate#1641 (reply in thread) for more context.

Use Case

I want to replace the state's title/name. Also helpful when the original state unique identified is too long (see #397 ).

image

Example:

const fetchMachine = createMachine<Context>({
  // ...
  states: {
    theRawId: {
      meta: {
        title: "The Nice Title", // Override theRawId
        description: "# Description\nAllows screenshots:\n![](https://upload.wikimedia.org/wikipedia/commons/thumb/b/bd/Web_Page.png/800px-Web_Page.png)"
      }
    },
  }
});
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant