OER-WEB-TEAM / design-system--drupal-theme

1 stars 0 forks source link

Remove TWIG templates from Drupal Components documentation #24

Closed AlexVanK closed 5 months ago

AlexVanK commented 6 months ago

Similar to #16 there is no need to expose twig copy/paste snippet. Everything is provided with the NIHOD theme.

Keeping TWIG just for reference in this case may not apply, as the Drupal Component won't work anywhere else but on Drupal

AlexVanK commented 5 months ago

Taken care of.

AlexVanK commented 5 months ago

This (along with #16) needs to be revisited.

The current logic is that twig defaults anything after the 3rd text field (text-area) of each component to a collapsed view:

Image

this is found under \themes\nihod5__subtheme-test\templates\field.

Yet, not every component has enough information to fill text-area 2 and 3. Creating empty text-areas won't work. Drupal automatically removes them. (Rightfully so!)

AlexVanK commented 5 months ago

Adjusted the template a bit -- mostly for margins and padding. The original idea of keeping the 4th text-area for collapsible code snippets was valid. Enforcing this scheme will help maintain a structured pattern to the data, especially for migration needs in the future.

So just filled empty text-areas with dummy "lorem ipsum" text. We will write something meaningful later.