headlamp icon indicating copy to clipboard operation
headlamp copied to clipboard

Make create/editor dialog work with a given YAML/JSON

Open joaquimrocha opened this issue 11 months ago • 1 comments

The EditorDialog component receives an item that needs to look like a Kubernetes resource. It takes into account things like the resourceVersion and other aspects of the K8s resources, which is nice, but it is impossible to use this editor with just plain text. E.g. if I want to pass it a YAML that is a list of resources, it is not possible. The only reason why the editor works for the create button is that it is opened with an empty item and then the user can add the code to it.

We should make sure that we have an editor component that accepts any YAML/JSON, and then only if we open an existing resource, we use the logic currently implemented in EditorDialog.

This affects e.g. any plugin who wants to show the default editor with code to the user.

joaquimrocha avatar Mar 15 '24 10:03 joaquimrocha

I see the PR is still open... It looks like this will be for the next release, so I changed the milestone.

/cc @joaquimrocha fyi

illume avatar Jul 25 '24 08:07 illume