- Issue created by @nicoloye
- 🇫🇷France pdureau Paris
The current category system is inherited from the core which provide a very basic and not very flexible system.
I am not very confortable about introducing our own category mechanism. There is nothing in Drupal Core / Contrib / Symfony / PHP we can reuse or build our categories upon.
We could probably propose a category plugin definition to allow setting multiple options on each category.
So, in styles definitions, the category will be a machine name reference to those plugins instead of a free text?
Why not :) but are we introducing a compatibility break? What would be the behaviour if the category is not defined?Anyway, thanks for pushing this proposal. If we do this, it is something we need to build at the UI suite level, to have the same mechanism for Components (ui_patterns), Styles (ui_styles) and CSS Variables (ui_skins).
- 🇫🇷France nicoloye
I am not very confortable about introducing our own category mechanism. There is nothing in Drupal Core / Contrib / Symfony / PHP we can reuse or build our categories system upon?
I understand, from what I've seen we are already using the core system right now and categories are only strings attached to a plugin through the category attribute. This is a very basic way of dealing with a categorization concept and it lacks proper control on the category order and initial intended display. I may lack knowledge on other mechanism and am open to discuss other solutions that I may not be aware of.
So, in styles definitions, the category will be a machine name reference to those plugins instead of a free text?
I would say so yes. I think it's a better way of guaranteeing a proper primary key between the component plugins and their categories.
Why not :) but are we introducing a compatibility break? What would be the behaviour if the category is not defined?
It would definitely be a breaking change so we need to discuss the proper way of introducing it everywhere it makes sense. I suggest we open a discussion about it in the next UI Suite meeting.