Replies: 3 comments
|
Relevant use case for this: a |
|
+1 on both proposals, with a supporting use case for Proposal 2 and a related surface worth keeping in view. Use case: our site has a "cards grid" section block where an editor picks N content entries to feature. What we want per row is an entry picker — a searchable combobox backed by a collection query. Because nothing richer than a plain scalar input can render per row today, the block instead exposes a multiline text field of entry slugs, split on newline at render time. It works, but it's the least editor-friendly field in our admin: typos are silent and there's zero discoverability. A The related surface: the same sub-field limitation exists in the Portable Text custom-block field modal (plugin-registered block types). Our testimonials block has a repeater of (Posted with AI assistance — Claude Code / Claude Fable 5, from @cyface's session; details are from our production plugin.) |
|
Following up on my earlier comment with a second, narrower case for Proposal 2 — and a smaller alternative that would cover it if full widget resolution in repeater rows is too big a lift. Use case: a per-row "override in effect" indicator. Our cards-grid section block has a Nothing in a repeater row can render that today. Against the installed
Two shapes that would fix it:
Either would let us build this without patching the admin bundle. Tracking on our side as an open issue pinned to (Posted with AI assistance — Claude Code / Claude Fable 5.1, from @cyface's session; details are from our production plugin.) |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Two related improvements for
selectediting inside repeater sub-fields:selecta searchable combobox.Motivation
Repeater rows frequently bind a
selectsub-field to a large, often taxonomy-derived option set. TodaySubFieldInput(inRepeaterField.tsx) renders a plainSelectfortype: "select", so a list of dozens/hundreds of options is a long scrolling dropdown with no filtering — painful to use per row.Concrete real-world case: a clinic directory where each clinic has
servicesanddiagnosticsrepeater fields, and each row'snameis aselectwhose options come from a treatments/diagnostics taxonomy. Editors pick from a large list per row.Proposal 1 — searchable sub-field select (focused)
Render
selectsub-fields with the KumoCombobox(typeahead) instead ofSelect, matching the search-as-you-type pattern. Small, self-contained change inRepeaterField.tsx. I've opened a focused PR for this.Proposal 2 — field widgets in repeater sub-fields (broader)
The plugin
fieldWidgetAPI (field.widget = "pluginId:widgetName") is currently resolved only for top-level fields inContentEditor.tsx(FieldRenderer). Repeater sub-fields go throughRepeaterField→SubFieldInput, which switches purely onsubField.type;RepeaterSubFieldDefhas nowidgetproperty and there's no widget resolution there.Extending field-widget support into sub-fields would let plugins provide custom editing UIs inside repeaters (e.g. a taxonomy-backed combobox), without anyone having to patch the admin bundle. This is bigger (schema
widgeton sub-fields, the sub-field editor UI to set it, persistence, and plumbingpluginAdmins/manifestintoSubFieldInput), so raising it here first per the contribution policy.Happy to work on Proposal 2 as a follow-up if maintainers are interested in the direction.
All reactions