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

Show errors to user if invalid scene data is loaded #22

Open
markmanx opened this issue Aug 31, 2023 · 1 comment
Open

Show errors to user if invalid scene data is loaded #22

markmanx opened this issue Aug 31, 2023 · 1 comment
Labels
good first issue Good for newcomers

Comments

@markmanx
Copy link
Owner

It's not difficult for a user to trigger a validation error when loading a scene. At the moment, Isoflow fails silently (errors can only be seen in the console). Users will appreciate seeing an error message if Isoflow can't load their scene (probably best displayed in a modal). We use Zod for input validation, and ideally we would let the user know where the error is in their input (e.g. connector with id {xxx} references a node which doesn't exist), but at this point that would be a nice-to-have.

At minimum Isoflow should display an error message if the scene fails to load.

@markmanx markmanx added the good first issue Good for newcomers label Aug 31, 2023
@markmanx
Copy link
Owner Author

To recreate a validation error, pass in the following initialData object (validation will fail because the nodes property is missing):

const initialData = {
  icons: [],
  connectors: [],
  rectangles: []
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant