Skip to content

Feature Request: Expose CMS field rendering components via public API #5088

@mjwlist

Description

@mjwlist

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

Extensions cannot import internal CMS rendering components because the build system blocks direct @webiny/* imports from extensions/. The following components are needed for custom field rendering (e.g. rendering dynamic zone template fields inside a Dialog) but are not re-exported through the webiny/* public API:

  • Fields from @webiny/app-headless-cms/admin/components/ContentEntryForm/Fields.js
  • TemplateProvider from @webiny/app-headless-cms/admin/plugins/fieldRenderers/dynamicZone/TemplateProvider.js
  • TemplateIcon from @webiny/app-headless-cms/admin/plugins/fieldRenderers/dynamicZone/TemplateIcon.js
  • ParentFieldProvider from @webiny/app-headless-cms/admin/hooks/index.js
  • ModelFieldProvider and ParentValueIndexProvider from @webiny/app-headless-cms/admin/components/ModelFieldProvider/index.js
  • AdminLayout from @webiny/app-admin

The current workaround is to place bridge files outside extensions/ (e.g. in lib/) that re-export from @webiny/*, then import from the bridge in extensions. This is fragile and breaks the intended extension architecture.

Describe the feature's behavior.

Expose these components through the existing webiny/* public API paths so extensions can import them directly:

// Desired imports from extensions/
import { Fields } from "webiny/admin/cms/entry/editor";
import { TemplateProvider, TemplateIcon } from "webiny/admin/cms/entry/editor";
import { ParentFieldProvider, ModelFieldProvider, ParentValueIndexProvider } from "webiny/admin/cms";
import { AdminLayout } from "webiny/admin";

The exact paths are suggestions — the important thing is that these are accessible via webiny/* so extensions can use them without circumventing the build system.

Describe alternatives you've considered.

The current workaround: bridge files in a lib/ directory outside extensions/ that re-export from @webiny/*:

// lib/CmsFieldRenderers.tsx — lives outside extensions/ to bypass the build restriction
export { Fields } from "@webiny/app-headless-cms/admin/components/ContentEntryForm/Fields.js";
export { TemplateProvider } from "@webiny/app-headless-cms/admin/plugins/fieldRenderers/dynamicZone/TemplateProvider.js";
// ...etc

This works but is fragile — internal paths can change between versions, and it defeats the purpose of the extensions/ import restriction.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions