Problem/Motivation

The main objective stated in #3313520: Single-directory components in core is:

We want to simplify the front-end development workflow, and improve maintainability of core and contrib themes.

along with:

Reduce the number of framework implementation details required to put templated HTML, CSS, and JS in a Drupal page.

I think a great example for demonstrating this would be to convert Umami's node.html.twig (and once SDC is stable, perhaps the node.html.twig of other core themes or even core/modules/node/templates/node.html.twig itself) into using components.

I think node.html.twig would make for a good example because it currently has so many variables, including a bunch of Drupal "implementation details", so seeing how this can be simplified by breaking into components where each one has fewer variables and where those variables are more generic and less Drupal-specific could be quite impactful.

Steps to reproduce

Proposed resolution

Discuss if it makes sense to refactor Umami's node.html.twig to use SDC, and if so, then do it.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3378588

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

effulgentsia created an issue. See original summary.

effulgentsia’s picture

Issue summary: View changes

finnsky made their first commit to this issue’s fork.

finnsky’s picture

StatusFileSize
new411.75 KB

Added badge component.
badge component

Gauravvvv made their first commit to this issue’s fork.

gauravvvv’s picture

Status: Active » Needs review
finnsky’s picture

StatusFileSize
new477.01 KB

Added list component
list component

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs issue summary update

Seems this was expanded, issue summary should be updated to match.

finnsky’s picture

I just added here some new optional components. Not sure what exactly this issue about.

finnsky’s picture

Moved badge component to own issue:
https://www.drupal.org/project/drupal/issues/3390334

finnsky’s picture

finnsky’s picture

@effulgentsia could you please clarify what you mean in this ticket?

Recipe or article template? Because the recipe template uses layout builder.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.