Skip to content
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

Bug: Multiple targets are not visualized / edited properly #223

Open
prepor opened this issue Feb 20, 2024 · 1 comment
Open

Bug: Multiple targets are not visualized / edited properly #223

prepor opened this issue Feb 20, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@prepor
Copy link

prepor commented Feb 20, 2024

XState version

XState version 5

Description

Machine definition:

createMachine({
  id: "settings",
  type: "parallel",
  states: {
    mode: {
      initial: "active",
      states: {
        inactive: {},
        pending: {},
        active: {},
      },
    },
    status: {
      initial: "enabled",
      states: {
        disabled: {},
        enabled: {},
      },
    },
  },
  on: {
    // Multiple targets
    DEACTIVATE: {
      target: [".mode.inactive", ".status.disabled"],
    },
  },
});
  1. https://stately.ai/registry/editor ignores multiple targets on code import and doesn't allow to add multiple targets for transition in the editor
  2. VSCode extension doesn't visualize it properly
    CleanShot 2024-02-21 at 00 57 15@2x
  3. But looks like machine itself works properly at runtime

Expected result

Visualization of multiple targets, support of multiple targets in the editor

Actual result

See description

Reproduction

https://stately.ai/registry/editor/5a9f50d5-523d-442d-af9b-45feb75d7903?machineId=322103a7-e178-467f-9d45-36c294ad74e0&mode=design

Additional context

No response

@prepor prepor added the bug Something isn't working label Feb 20, 2024
@davidkpiano davidkpiano transferred this issue from statelyai/xstate Feb 21, 2024
@davidkpiano
Copy link
Member

Thank you for the report. This feature is planned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants