- Issue created by @prudloff
- @prudloff opened merge request.
- 🇫🇷France prudloff Lille
The MR adds support for the first level of array items, but it would probably be best to implement this recursively.
- e0ipso Can Picafort
Thanks for the contribution! I took a quick look at this. My first question is, would this also be necessary for objects (and not just arrays).
My second question is, this would not be an issue if each one of the array items was a component itself. Is there a use case not to turn it into one?
- 🇫🇷France prudloff Lille
My first question is, would this also be necessary for objects (and not just arrays).
I don't think we have a use case for this but I guess it would make sense to allow it on objects as well.
My second question is, this would not be an issue if each one of the array items was a component itself. Is there a use case not to turn it into one?
We discussed this internally and while we agree it is cleaner if each item is a component, some core templates like
menu.html.twig
render both the root attributes and each item attribute in the same template. And for this kind of template, we want to stick as closely as possible to what the core does but we still want to be able to write stories with example attributes.