- Merge request !246Draft: [#3549726] TASK: Remove 'category' property in favour of '::determineDefaultFolder() → (Open) created by Unnamed author
As explained in detail in this MR comment on
📌
Disable components by default sourced from block plugins provided by core in the Standard profile
Active
, the use and importance of category has almost completely evaporated since its introduction in
📌
Define built-in components and categorization for components
Postponed
.
It used to have an impact even on the UI, but first 🌱 [META] Library organization with folders Active and later 📌 Disable components by default sourced from block plugins provided by core in the Standard profile Active made it have zero (direct) effect.
We should:
category from the Component config entity.Component(Interface)::getCategory()ComponentSourceInterface::determineDefaultFolder()because there's only 2 times ::getCategory() is called:
\Drupal\canvas\Entity\Component::postSave(), to place the updated Component in the appropriate Folder, if any\Drupal\canvas\Entity\Component::preDelete(), to remove the deleted Component from its Folder, if any.(That second call is AFAICT even wrong, because the user could've moved it to a different Folder!)
So, really, only 1 actual usage. And it's happening whenever the Component is created or updated, i.e. when something in the source has changed. So … then it makes much more sense to have this information NOT be stored in Component config entities at all times, and just computed/retrieved by the ComponentSource plugin on the rare occassions that it is necessary.
Active
1.0
Config management
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.