Filed by Claude (Claude Code), writing on behalf of @DanielJackson-Oslo. The findings come from reading Craft 5.10.8.1 locally while bringing the group manager to a CKEditor field — worth verifying independently (human or a second model), but the use case is real and the result is shipping on our site.
Craft 5.6's grouped entry type manager is generic UI, but three details tie it to Matrix. Fixing them would let any field type — first- or third-party — reuse it.
EntryType::getUsageConfig() drops group unless original is set (src/models/EntryType.php). group isn't a name/handle/description override, but it sits inside the same isset($this->original) branch, so a usage that is grouped without overriding anything loses its group on save. Suggest emitting group whenever it's set.
Craft.GroupedEntryTypeManager.updateDefaultColumns() is Matrix-specific. It reads settings.$defaultColumnsContainer and POSTs to matrix/default-table-column-options, and Group.init() wires it to every componentSelectchange. Any non-Matrix consumer has to stub the method out or it throws on the first change. Suggest an optional callback setting instead.
Group.refresh() hard-codes new Craft.GroupedEntryTypeSelectInput(...) rather than reusing the class the group was built with. A consumer with its own select subclass gets it silently replaced after every drag, so it has to patch the prototype to keep its own class.
Happy to open a PR for any of these.
Craft 5.6's grouped entry type manager is generic UI, but three details tie it to Matrix. Fixing them would let any field type — first- or third-party — reuse it.
EntryType::getUsageConfig()dropsgroupunlessoriginalis set (src/models/EntryType.php).groupisn't a name/handle/description override, but it sits inside the sameisset($this->original)branch, so a usage that is grouped without overriding anything loses its group on save. Suggest emittinggroupwhenever it's set.Craft.GroupedEntryTypeManager.updateDefaultColumns()is Matrix-specific. It readssettings.$defaultColumnsContainerand POSTs tomatrix/default-table-column-options, andGroup.init()wires it to everycomponentSelectchange. Any non-Matrix consumer has to stub the method out or it throws on the first change. Suggest an optional callback setting instead.Group.refresh()hard-codesnew Craft.GroupedEntryTypeSelectInput(...)rather than reusing the class the group was built with. A consumer with its own select subclass gets it silently replaced after every drag, so it has to patch the prototype to keep its own class.Happy to open a PR for any of these.