Creating an admin FormComponent (with React UI)

Hey all, we have a need for some fields to have a custom editor in XByK. Our design system has classes for standard UI elements like primary, secondary, etc. We want the author to be able to select one of those values from a dropdown for certain content types or even widgets to keep them standardized.

At first I created a FormComponent that basically was the same as the regular dropdown, but it injected the options for primary, secondary, etc to the dropdown. Unfortunately, that exposed the datasource property and delimiter, albeit prepopulated with the values. I want that abstracted away and hidden, so I think we need a FormComponent with a React piece for the UI. I've been spinning my wheels trying to implement this and I think I have the code wired up correctly, but the build tooling part, injecting the react, etc all seems to be the stumbling block. I'm getting errors about "invalid character <" in the entry.js file which usually means it's serving up HTML (likely a 404) when accessing the javascript asset. Something in my build tooling or setup isn't right.

Is there a clean guide that talks about how to set this up? It's minimal hello world code right now, so no extra overhead that I know of should be causing issues.

Environment

Tags:
Content hub Content types React

Answers

Things available today to help you:

  1. Use the kentico-xperience-admin-sample .NET template which is already configured with all the admin customization configuration correctly wired-up.
  2. Follow the docs that walk you step-by-step through the creation of a Color Selector UI Form Component with a React client component.
  3. Review the Kentico Community Portal which includes several simple and advanced React components for custom UI Form Components.

I'm working on something that will help with Admin UI extension, but it's not ready quite yet. I'll update this response when it's released.

Accepted answer

I had some things mis-wired, so I reverted and went back through the docs, particularly:

https://docs.kentico.com/documentation/developers-and-admins/customization/extend-the-administration-interface/prepare-your-environment-for-admin-development.html?utm_source=aira

Combine that with some conversations with AIRA about how react gets injected into the build, and it rendered without error and seems to be working. I'll update this post as needed.

Thanks, Sean!

To response this discussion, you have to login first.