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.

Header 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 Header component, which includes markup, CSS, and JS.

This component is a good fit because:
This first component in core which explains how to use javascript in component and define dependency.
This menu was defined without dependencies. But i think we need to show how to use them in SDC

Testing instructions

burger example

  1. Install Umami
  2. Switch to mobile
  3. Test burger menu
  1. Switch to desktop
  2. Test main menu for regressions

Issue fork drupal-3404302

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

finnsky created an issue. See original summary.

finnsky’s picture

Status: Active » Needs review
finnsky’s picture

finnsky’s picture

Issue summary: View changes
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Applied the MR locally taking before screenshots (won't upload as the video is there) and the after screenshots which look exactly the same.

Looking this seems to be the first example using css, js, and images so awesome!

lauriii’s picture

Status: Reviewed & tested by the community » Needs work

Posted feedback in the MR.

finnsky’s picture

Thank for review. Gonna quickfix

finnsky’s picture

Status: Needs work » Needs review
needs-review-queue-bot’s picture

Status: Needs review » Needs work
FileSize
3.8 KB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

finnsky’s picture

Title: Create Burger Component for Umami. Component with JS » Create Header Component for Umami. Component with JS
Issue summary: View changes
finnsky’s picture

Status: Needs work » Needs review

I think Header component will be cleaner to understand.

Please review!

markconroy’s picture

Status: Needs review » Reviewed & tested by the community

This looks great. Thanks @finnsky.

RTBC from my point of view.

quietone’s picture

I'm triaging RTBC issues. I read the IS and the comments. I didn't find any unanswered questions or other work to do.

Leaving at RTBC.

quietone’s picture

Title: Create Header Component for Umami. Component with JS » Create header component for Umami, with JS

I also meant to adjust capitalization in the title and remove the '.'.

finnsky changed the visibility of the branch 11.x to hidden.

catch’s picture

Component: single directory components » Umami demo

  • nod_ committed bc4b7872 on 11.x
    Issue #3404302 by finnsky, smustgrave, lauriii, markconroy: Create...

  • nod_ committed e05d9f47 on 10.3.x
    Issue #3404302 by finnsky, smustgrave, lauriii, markconroy: Create...

nod_’s picture

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

Committed bc4b787 and pushed to 11.x. Thanks!

Status: Fixed » Closed (fixed)

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