-
-
Notifications
You must be signed in to change notification settings - Fork 0
Code fields save a string #12
Copy link
Copy link
Open
Labels
bugUnintended behaviour and security vulnerabilitiesUnintended behaviour and security vulnerabilitieshelp wantedIssues where help is needed from other contributorsIssues where help is needed from other contributors
Metadata
Metadata
Assignees
Labels
bugUnintended behaviour and security vulnerabilitiesUnintended behaviour and security vulnerabilitieshelp wantedIssues where help is needed from other contributorsIssues where help is needed from other contributors
In the Configuration UI, the "code" field currently saves the object as a string, which is obviously not correct.
Even getting the code editor to work properly thus far took some doing. Feels like the
vue-prism-editoris quite fragile, and as it can't take an object as a value, there needs to be some parsing to ensure any field with a code editor first stringifies its content for the editor, and then parses it into an object for saving. All the while making sure these transformations do not trigger reactivity. Also, only Vuex knows which fields are code fields, but the Configuration state needs to stay outside of Vuex to make sure changes aren't visible throughout the UI before they are saved. And some kind of validation might also be useful.