-
Notifications
You must be signed in to change notification settings - Fork 109
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
fix: Prevent demo data from being created on edited tables #1005
Conversation
d92aaac
to
8e2c9ca
Compare
* | ||
* @param {Field} field | ||
*/ | ||
generateInitialDemoData: (field) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, let's be careful with these kinds of changes. Our config object is tied in with the custom component framework and should be treated more or less as public API. Of course we're never obligated but changing how it's structured is something we should not do often.
I highly doubt anyone was using this already, considering how unique this stuff is, but this a breaking change if we were very strict about it.
Maybe it's worth annotating this as experimental, so that we can be safe in the future if we do decide to remove it entirely (which I believe will happen when we have more robust ways of doing demo data).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or moving it to an experimental sub-object, which should get the point across 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Skaiir I added the @experimental
tag
With the table component we added the concept of adding demo data to the new component, this data was being added when importing forms into the modeler.
This PR prevents this from happening and only adds the demo data when the schema matches with the demo data
Closes #997
form-js
element or visually changes an existing component.