- Issue created by @mansspams
Why are we not using namespaces for components? Was there some technical limitation of being able to include CSS and JS with component if we reference TWIG file?
I am asking, because I can't set up my IDE to have autocomplete and jumping from component use to component directory directly. With namespaces defined this line {{ include('@theme-name/components/atom/text/heading.html.twig') }}
would be autocomplete, I just start typing `hea...` and get the whole path to file, also I can click on any part and get to right directory, be it `components`, `atom` or `text`. From there I can jump to any embedded or included components and so on and on. With proposed way of doing includes `{{ include('sdc_examples:my-button') }}` none of this is possible (or I can't see how to set it up), and I have to keep hundreds of component and variation names in memory.
Maybe it would be cool to use component *.component.yml file as *.libraries.yml, extend that libraries file format to include what we need, then reference it in TWIG as per usual, like {{ attach_library('sdc_examples/my-button') }}
and we would get CSS and JS files from there and we could reference components by TWIG files and have all the TWIG infrastructure usable? None of this is any technical, just ramblings at the moment, but I can see these styles of includes as a hurdle to adoption of single-directory components.
Active
11.0 🔥