-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for custom elements #123
Comments
Thanks for opening this issue. Custom elements are on our mid-term roadmap. |
Hi, is there a way to develop our own component and add it to the left panel (FORM ELEMENTS LIBRARY) ? |
Work in progress, proof of concept only. Ref bpmn-io#123
@nikku - I have a working prototype of custom elements (although very brutal and needs a lot of refactoring and test specs), let me know if this is what you envisioned. added customFields and customPropertyPanelGroups options. And then added my File Input Field Type and Property Panels to the FormEditor and From options in the Playground.js I could have chose a simpler example, but I had this one done already. https://github.com/dfulgham/form-js/tree/custom-elements-API The Following two Objects make up a custom field type and property panels.FileInput Custom Field Type:
Custom Property Panels:
|
@dfulgham This is what I've envisioned. Will check it out in detail in the next days. But from what it looks like (quick overview) this is a great start towards a custom element API. |
@nikku going to need a little help in getting the tests created and code coverage. Is there a way in the local environment to generate code coverage? I'm pretty new to lerna |
Is there any plan, when this feature will be implemented? |
Hey @SeanAda, this is in our roadmap but still, we have no set date for implementing this |
@nikku is there any progress on this implementation? I see we are at 1.0 now, if it would be helpful, if I can get some information on the planned approach I can look at doing a draft implementation. I'm needing this for our self hosted Camunda Enterprise application. |
@dfulgham Unfortunately, there are no concrete steps planned right now. Personally, I'd like to tackle this topic sooner than later, but it's always a matter of priority in comparison to other topics we tackle. As form-js reached a good state in the recent month, I can imagine this topic to be a reasonable next step to open up for for our community 🚀 We are open - and really appreciate - all suggestions you'd contribute 🙂 👍 |
@pinussilvestrus Since I would eventually like to be able to use any custom components in the Web Modeler (self hosted) and potentially the Cloud Modeler (?) as we have implemented Camunda Enterprise. It won't be as easy as my previous attempt while using the form-js in a web project. Is there any good starting points relating to the requirements from Camunda Forms modeller? Obviously a simple JSON object (like that used for custom diagram elements in bpmn-js) can't hold the functional pieces required for forms. |
@dfulgham Good news: we discussed this topic internally and agreed this as a priority for this quarter (Q3/2023). To manage expectations we do not aim to deliver something end-to-end by the end of this, but at least a concept of how we want to tackle this, also especially given the requirements we have to make it work across our product stack (Web Modeler, Tasklist, ...).
Indeed this is a challenge. For self-managed, I can see this rather easily, but for SaaS, we need indeed an answer on how to provide some kind of plugins - not only for forms potentially but also for BPMN. What I have loose in mind is to follow a similar approach as we do with Connectors in BPMN land where such "customizations" are first-class citizen in the product, with an own editor to develop such.
I agree a JSON schema is insufficient here, cf. also the list of requirements above. It includes rendering parts and ways of how to deliver extensions to other components, such as the palette and properties panel. But, this is nothing we don't already solve in other libraries, as in bpmn-js. To summarize, as we tackle this one conceptionally, any input (as suggestions, feedback, or PRs) here is highly welcome 👍 |
We created a spike of needed changes to support everything we listed above (and more). We will discuss internally how to proceed and how to bring this out of the door. |
Update after HTO team weekly
|
While the functionality of adding custom components has not been implemented, is it possible to implement filtering so that only registered field types are displayed on Pallete, and not all default ones are imported? |
@DK-2013 I think this is not yet possible, at least not easily. The palette entries are generated from the FormFields component in a pretty static manner. With the custom elements support that will land in soon it will generate the entries dynamically from the form fields service, so it will be possible to override the form fields definition registry and with that also what is being displayed in the palette. You can follow the spike above. We will get back to this issue and notify once he feature is released. |
@pinussilvestrus This is great, I will be playing with this on the weekend when I find some spare time. Really needing this for our app. We currently parse our form controls into two groups, one for formJS supported controls and another for ones we tag with a custom property "customElement":true. The formJS we render to the left and custom controls we render to the right with custom form implementation. Not really ideal, so it will be great to be able to render the custom controls with formJS in the location where they need to be. |
@dfulgham thanks for sharing ! Any early feedback is more than welcome 👍 |
In the form playground demo we created a simple demo to upload custom form components (WIP): camunda/form-playground#106 (comment) Please refer to the notes about some important implementation constraints to make extensions work in the demo environment. |
A good bunch of improvements in our extensions API was just merged via #776 🎉 This will be released with the next minor. We already contributed a bpmn-io style example via bpmn-io/form-js-examples#7. Next steps
|
Would be great to cover this (major feature!) with a dedicated blog on bpmn.io. If possible we want to consider to teaser it via our social channels, too. |
I created an issue and will tackle this in the next iteration after our HTO offsite 👍 form-js v1.4.0 will get two blog posts, which is great :) |
Can i create custom components with form-editor or playground mode (v.1.8.3), and how do that? Please help me! thanks @nikku @pinussilvestrus |
Hi @Ken-Scofield , it's best to read this docs page and the surrounding pages: https://docs.camunda.io/docs/next/apis-tools/frontend-development/forms/customize-and-extend/custom-components/ |
@christian-konrad thanks, boss! Can i use custom components in 'FormEditor' not 'Playground'? |
Is your feature request related to a problem? Please describe.
As a developer, it would be beneficial to have the ability to add custom elements to the palette in both the designer and viewer interfaces. Incorporating an upload component with custom behavior would be an example use case.
Describe the solution you'd like
Ideally, a library consumer should be able to override the element registry, and hook their own element types into it. We would then expect to be able to define the structure required for the properties panel (and eventually a schema for component validation) as part of our new component implementation.
Describe alternatives you've considered
n/a
This is a pretty large scale refactoring, and it requires quite a few steps:
FormField.config
options)Cf. the recent spike we conducted
The text was updated successfully, but these errors were encountered: