How to update the file yaml with the yaml code in studio #3717
Replies: 1 comment 1 reply
-
The yaml describes an application declaratively, we have a react component that takes this declaration and renders a full aplication. We use this for the production output. Our editor does the same, but wraps this application with the editing UI, it also adds an overlay over it to capture clicks for selection and to show selection UI. Whenever you change something in the editor, we update that underlying data model which updates the rendered application. at the same time we write these changes to the file as well.
We treat the yaml configuration as static, in the production runtime the application can't change its own source code. At the moment we don't support this use-case, and I expect it to be too unsafe to ever implement. |
Beta Was this translation helpful? Give feedback.
-
Hi, I can see that when I drag and drop the components, for example, toolpad will update the yaml file of the app. And when I edit the yaml file, it will update the UI components back. Can you explain the mechanism of this, like the steps from update UI to update yaml file and vice versa?
Moreover, I got this scenario: I click a button and then a yaml code chunk will be get from my server. I want to replace the yaml file content with the yaml code I just got whenever I click the button. Is it possible to implement? And if it is, which functions I should call to handle the logic?
Beta Was this translation helpful? Give feedback.
All reactions