emulsify-ds / compound

Compound is the default component collection for Emulsify
https://emulsify-ds.github.io/compound/
GNU General Public License v2.0
12 stars 12 forks source link

Is Dependency injections flawless with Drupal? Can we separate styles? #57

Open eeepam opened 1 year ago

eeepam commented 1 year ago

How this dependency injections works with Drupal?

I just installed and tested this system. Really awesome but I quite does not understand how naming works. When i install tabs molecules via emulsify cli it's grab well. But

https://github.com/emulsify-ds/compound/blob/d22b62e505a79d04ab845ae3df886bbcc9ae4d52/components/02-molecules/tabs/tabs.twig#L27

This machine name is not converted automatically. So it's not match with my theme id which is my_awesome_theme (I just followed docs 😄)

So It's generates error.

image

I think we need some works on dependency system and replacing these dynamic machine names.

Because for now it's statically placed.

https://github.com/emulsify-ds/emulsify-drupal/blob/83bde70d36b8fe2c6074655e7fcee9366b6030f9/emulsify.libraries.yml#L19

To solve that problem we can use this kind hook and creates library for each atom/molecule etc.

https://www.drupal.org/project/drupal/issues/3092496

Part One: machine name tokenization to automatically update these names when grabbing these components to our newly created theme Part Two: library dependency chain for all atoms/molecules etc. + webpack config for individually scss building + hook to load all libraries

emircanerkul commented 1 year ago

I have lots of progress regarding this improvement https://github.com/emulsify-ds/compound/pull/61

sync-by-unito[bot] commented 4 months ago

➤ Callin Mullaney commented:

PR closed - https://github.com/emulsify-ds/compound/pull/61