- Issue created by @phenaproxima
- ๐บ๐ธUnited States phenaproxima Massachusetts
I would like to mention one thing about ComponentSource sounding roughly analogous to MediaSource -- the reason MediaType plugins are not a thing is because MediaType is a bundle config entity -- same idea as NodeType. I think that, if the media system didn't have bundle entities, MediaSource plugins would be named MediaType plugins.
XB, however, has nothing analogous to MediaType entities. So it should not necessarily be echoing Media's naming decisions here.
- ๐ณ๐ฟNew Zealand danielveza Brisbane, AU
I don't feel strongly about this one. I'm a soft +1 for ComponentType. In a ComponentSource (using it's current name), nothing is actually being sourced from anywhere. At this point it's handling the render and data transformation layers for use inside XB. This makes it feel more like a type to me, and I think @effulgentsia points at the bottom of the IS outline this in a really clean way that makes sense to me.
At the moment we decocate cores plugin providers (BlockManager & ComponentPluginManager) to create/update XB component entities from existing plugins. We don't currently use any particular term or interface for these, but to me this is what should be considered a Component Source. Components are being sourced from another system like block or SDC currently, and LB and paragraphs in the future.
Naming is hard!
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Yep, Daniel hits the nail on the head: the sourcing does happen, and thatโs why the name conceptually makes sense, but it happens outside the source plugin itself, which makes the name a bit off.
The thing is though, that depending on where the components are being sourced from (currently: 2 different plugin types, 1 config entity type, and later: anything), different implementations are needed. So truly having everything self-contained in the source plugin is AFAICT impossible.
But perhaps one of you has a genius insight for how to change that? ๐ค
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Taking my last comment further: what if a component source plugin could declare the (forgive me) type of source discovery?
Similar to how an entity type plugin declares its
access
And that that would then result in either
discovery = FromPluginManager::class,
Or from
discovery = FromConfigEntityStorage::class,
Thatโd help tie things together?
- ๐ฎ๐ณIndia mohit_aghera Rajkot
I don't have strong opinion on `ComponentType` vs `ComponentSource`.
However as non-native english speaker, I felt `ComponentSource` more convenient to realise that there are so x number of source plugin that allows XB component config entities to be created.Regarding declaring source discovery:
Strong +1 from me.
I faced the issue while working on Pinto integration.
Since pinto object are standalone object, there was no easy way to identify and create Component config entities.
I'm relying on hook_cache_flush to refresh the list and generate new `Component` config entities.