Proposal: Create stub extensions for civicrm core + all components
- Truncate descriptions
Edited to reflect the current state of things, some comments reply to an earlier revision
Motivation 1:
Require SearchKit in core. This has been solved in a different way so is no longer relevant to this issue.
Motivation 2
We are starting to package SearchKit displays as replacements for Smarty/DataTables in the UI. This has worked out great for CiviGrant: now that it's an extension we can easily package Afforms, SavedSearches and other managed entities with it. But other components are not extensions and so have no mechanism for including their own managed entities, afforms, etc. Components are less modular and more monolithic than extensions.
Motivation 3
Currently an extension has no way to require a component, e.g. an extension cannot declare a dependency on CiviEvent.
Motivation 4
Extensions and Components are similar but not the same, and this is confusing to new users and new developers. In most respects Extensions are better than Components, and it would be great to "some day" have all components simply be extensions.
Proposal
Given the experience of converting CiviGrant to an extension was a "harder than expected" undertaking, I think converting all other components to extensions at once is not a realistic goal. It would need to be a slow, iterative process, and I propose this as the first iteration:
- Create a small stub extension for each component (CiviEvent, CiviContribute, etc).
- Use hooks to sync between the
civicrm_extension
table and thecivicrm_component
table, so that enabling the "CiviEvent" extension also enables the "CiviEvent" component, and vice-versa. - Get rid of the "Manage Components" screen. Admins can enable/disable components via the "Manage Extensions" screen.
- Show labels
- Show closed items