Create new SDC component for Umami (umami common footer block)

Created on 21 June 2023, over 1 year ago
Updated 25 October 2023, about 1 year ago

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.

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

Testing instructions

Make sure you have SDC module enabled, if enabling via drush si demo_umami it will be installed by the profile
Clear caches
Test umami footer blocks - you should see HTML like the screenshot below showing that the block is being rendered via a component.

Components description

Common Footer Block contains:

1. Optional image
2. Title
3. Content

Title component contains:
1. specific Drupal properties: title_prefix, title_suffix
2. optional html tag as property
3. In the future, it will allow us to control the typography of the site through css classes. EG: `.umami-title--h1 {}` what is better that `h1 {}`
In terms of BEM: https://en.bem.info/methodology/quick-start/#block `You also shouldn't use CSS tag or ID selectors when using BEM.`

Optional follow up

Create follow up issue for footer menu, Which seems equal in terms of CSS with recipe tags list over this footer.

✨ Feature request
Status

Fixed

Version

10.2 ✨

Component
Umami  →

Last updated 15 days ago

  • Maintained by
  • 🇮🇪Ireland @markconroy
  • 🇬🇧United Kingdom @smaz
  • 🇬🇧United Kingdom @kjay
  • 🇺🇸United States @shaal
Created by

🇮🇳India gauravvvv Delhi, India

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024