wikimedia / vegalite-wordpress-plugin

4 stars 2 forks source link

#37: Replace unmaintained JsonEditor-React component #48

Closed kadamwhite closed 5 months ago

kadamwhite commented 5 months ago

The JSON editor component we've been using has a lot of bad usability foibles, making it very easy to deselect your JSON while trying to make text edits or to actually prevent you from making changes in-editor. That isn't very helpful, so this PR replaces that editor with a basic TextareaControl wrapped in a small amount of logic to prevent sending invalid JSON back up to the parent component.

For #37 — not necessarily a permanent solution, but should get us by for now and also unblocks merging #44 because it removes the Node version dependency issue with jsoneditor-react.

vega-lite-new-editor