Skip to content

No admin UI to assign a plugin fieldWidget to a field in Content Types (seed/SQL only) #2052

Description

@DavidPivert

Summary

A plugin can register a field widget via admin.fieldWidgets (native format now works since #1483). The widget renders correctly in the entry editor once a field's widget is set to "pluginId:name". However, there appears to be no way to set that widget from the admin UI: the Content Types field editor offers no widget picker.

In the admin bundle, fieldWidgets is only ever consumed to resolve a widget at render time:

fieldWidgets?.find((w) => w.name === widgetName)

There is no code building a list of available widgets (filtered by the field's type) for the schema editor. So the only ways to assign a plugin widget to a field are:

  • a seed entry ({ "slug": "seo", "type": "json", "widget": "pluginId:name" }), or
  • writing _emdash_fields.widget directly (SQL/migration).

Steps to reproduce

  1. Install a plugin that declares admin.fieldWidgets: [{ name: "x", label: "X", fieldTypes: ["json"] }].
  2. In the admin, Content Types → a collection → add or edit a json field.
  3. Look for a way to select the plugin widget "X" for that field.

Expected

When editing a field whose type is in a registered widget's fieldTypes, the field editor offers a "Widget" selector listing the matching plugin field widgets (label + pluginId:name), so a non-technical editor can assign it without touching seed/SQL.

Actual

No such selector. The field saves with an empty widget, so the default editor for that type is used. The only way to wire the plugin widget is seed or a direct DB write.

Question / possible intent

Is seed-only assignment by design (matching how @emdash-cms/plugin-field-kit documents usage — seed "widget": "field-kit:list")? If so, a note in the docs plus surfacing the available pluginId:name values somewhere in the admin would help. If not, a widget picker in the field editor would close the loop between "plugin registers a widget" and "editor can use it".

Environment

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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