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:
- branding.css
- block--system-branding-block.html.twig
Testing instructions
- Set up site with Umami profile
- View page and see that logo is visible
- Inspect markup with twig debug enabled and verify that component is being used `
`
- 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
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:
- 3365464-create-new-sdc
changes, plain diff MR !4122
Comments
Comment #3
sarahjean commentedComment #5
gauravvvv commentedComment #6
smustgrave commentedSame deal I think since SDC isn't installed the tests are failing.
Comment #7
amanire commentedAha! That's it. So I think we just need to add SDC to
core/profiles/demo_umami/demo_umami.info.yml.Comment #8
gauravvvv commentedComment #9
smustgrave commentedAll green.
Comment #11
e0ipsoAside 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.
Comment #16
lauriiiCommitted 69e6c44 and pushed to 11.x. Thanks! Also cherry-picked to 10.1.x because Umami is forever experimental.
Comment #17
chi commentedAdded a follow-up. #3379522: Revert broken flexbox after Branding component creation
Comment #18
dieterholvoet commented