jsonforms icon indicating copy to clipboard operation
jsonforms copied to clipboard

Make ControlWrapper configurable in vue-vanilla

Open dzikoysk opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe.

We'd like to modify the the way how JsonForms Vanilla for Vue 3 renders controls, to e.g. sth like:


Label Description [ Control ]


Unfortunately, all built-in control renderers use ControlWrapper under the hood that defines this behavior, but it's simply just a hardcoded component that we cannot modify:

https://github.com/eclipsesource/jsonforms/blob/23e1a557d176e27d35febe74c75279b6b29b0a09/packages/vue/vue-vanilla/src/controls/ControlWrapper.vue#L1-L13

Describe the solution you'd like

Would be great if ControlWrapper could be provided by user in configuration or as a renderer, e.g. ControlWrapperRenderer just like any other wrapper.

Describe alternatives you've considered

At this point, we're forced to make a fork to provide desired functionality as it's probably the only way atm.

unknown-141

~ https://github.com/reposilite-playground/jsonforms

Framework

Vue 3

RendererSet

Vanilla

Additional context

No response

dzikoysk avatar May 03 '22 16:05 dzikoysk

Hi @dzikoysk,

Thanks for the suggestion. I think this makes sense. In the renderers we could inject the control wrapper instead of hard coding it, falling back to the default control wrapper if none is injected. Then you can easily provide the wrapper from outside of JSON Forms.

Would you be able to contribute this?

sdirix avatar May 11 '22 15:05 sdirix

Unfortunately I'm not that experienced with JsonForms & TypeScript to provide convenient solution - it took me a while to apply some hardcoded changes to the codebase, and I'd lie if I'd tell that all of them even work 😬

dzikoysk avatar May 11 '22 16:05 dzikoysk