Problem/Motivation

Single directory components (SDC) is a new way to theme Drupal. Instead of scattering related files around your theme, they're contained to one directory. The primary issue for SDC is at #3313520: Single directory components in core.

The Demo Umami team has decided that their theme can depend on an experimental module like SDC. This allows us to have the work in this ticket merged even when #3352256: [META] Move code from the experimental SDC module to core is not committed.

Branding component

As part of SDC's roadmap (see #3345922: Single Directory Components module roadmap: the path to beta and stable), we want to convert Umami components to use SDC. For this task I'm choosing the Branding component, which includes markup and CSS.

This component is a good fit because: it is simple and fairly modular styling already

This component involves the following Twig templates, CSS, assets, and libraries:

  1. branding.css
  2. block--system-branding-block.html.twig

Testing instructions

  1. Set up site with Umami profile
  2. View page and see that logo is visible
  3. Inspect markup with twig debug enabled and verify that component is being used `

    `

  4. Check the theme settings and verify that the component works with the different settings, such as adding a site slogan, disabling the logo image, etc...

Issue fork drupal-3365464

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

sarahjean created an issue. See original summary.

sarahjean’s picture

Issue summary: View changes

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

gauravvvv’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Needs work

Same deal I think since SDC isn't installed the tests are failing.

amanire’s picture

Aha! That's it. So I think we just need to add SDC to core/profiles/demo_umami/demo_umami.info.yml.

gauravvvv’s picture

Status: Needs work » Needs review
smustgrave’s picture

Assigned: sarahjean » Unassigned
Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

All green.

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

e0ipso’s picture

Aside from the two nitpicks I applied, I think this is ready to go. I didn't click through it, but I believe @smustgrave covered that in #9.

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

  • lauriii committed 69e6c445 on 11.x
    Issue #3365464 by sarahjean, Gauravvvv, e0ipso: Create new SDC component...

  • lauriii committed c05f365b on 10.1.x
    Issue #3365464 by sarahjean, Gauravvvv, e0ipso: Create new SDC component...

lauriii’s picture

Version: 11.x-dev » 10.1.x-dev
Status: Reviewed & tested by the community » Fixed

Committed 69e6c44 and pushed to 11.x. Thanks! Also cherry-picked to 10.1.x because Umami is forever experimental.

chi’s picture

dieterholvoet’s picture

Component: theme system » Umami demo

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.