Skip to content

Document addon configuration fields for Replicator/Bard sets #1983

Description

@eminos

Companion tracking issue for the proposed API in statamic/cms#15422. The PR is a draft and has not been merged.

The change adds Statamic\Fieldtypes\Sets::appendSetConfigField($handle, $config) and appendSetConfigFields($fields) to register native configuration fields in the Edit Set stack for Replicator and Bard.

Documentation should distinguish reusable set configuration in a blueprint/fieldset from fields stored on individual content blocks. For example, an addon can register an editorial note or a native group of guidance fields. The values are saved alongside that set's native configuration.

Suggested coverage once the API is accepted:

  • Register fields during a service provider's boot phase, using keyed native field definitions.
  • Single-field and multiple-field examples, including a group for namespaced nested configuration.
  • Native preprocessing, metadata, validation, and processing apply. Validation is enforced when applying/saving the containing field.
  • Edit Set's Confirm button updates the containing field editor; save the field and blueprint/fieldset to persist changes.
  • Native set keys are reserved. Use addon-specific handles.
  • Existing custom metadata remains intact when its addon is not registered.

The extension is generic; no AI-specific settings are added to core.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    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