Is your feature request related to a problem? Please describe
Currently, when setting a new schema to the form-js-playground, the import warning for the editor/viewer won't be populated.
import { Playground } from '@bpmn-io/form-js-playground';
const playground = new Playground({
container: document.querySelector('#container'),
data
});
// this does not catch anything
playground.setSchema(schema);
The reason is that we simply set the schema as the state in the Playground component and ignore any errors and warnings during import in editor/viewer.
As a consumer, I have no chance to check whether an import was successful or not. Check out the following logs when importing a form with errors.
Describe the solution you'd like
Make it possible to get import warnings and errors, probably similar to how the editor or viewer is doing it.
Is your feature request related to a problem? Please describe
Currently, when setting a new schema to the
form-js-playground
, the import warning for the editor/viewer won't be populated.The reason is that we simply set the schema as the state in the Playground component and ignore any errors and warnings during import in editor/viewer.
As a consumer, I have no chance to check whether an import was successful or not. Check out the following logs when importing a form with errors.
Describe the solution you'd like
Make it possible to get import warnings and errors, probably similar to how the editor or viewer is doing it.
Describe alternatives you've considered
Workaround: Use the editor instead to get proper import errors
Additional context
Discovered while working on https://github.com/bpmn-io/internal-docs/issues/527. Related to https://github.com/bpmn-io/form-js/issues/289