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 Olivero component to use SDC. For this task I'm choosing the tabs component, which includes markup, CSS, and JS.

This issue is of course blocked on actually getting SDC into core. See #3340712: Add Single Directory Components as a new experimental module.

Testing instructions

  1. Apply the the code from the #3340712: Add Single Directory Components as a new experimental module issue. Note you can download the plain diff and apply it via git apply
  2. Apply the code from this MR
  3. Clear caches
  4. Test tabs when logged in (View, Edit, etc tabs)

Issue fork drupal-3347235

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

mherchel created an issue. See original summary.

mherchel’s picture

Issue summary: View changes

Adding testing instructions.

mherchel’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative
mherchel’s picture

This can't pass until SDC is committed to core. The failures are because the tabs component is missing (because SDC is currently non-existent in core)

smustgrave’s picture

Status: Needs work » Postponed

Saw that after I placed my comment. So moving to postponed until that gets committed.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

e0ipso’s picture

Status: Postponed » Needs work
Issue tags: +SDC Sprint DrupalConNA 2023

SDC is committed to core. Let's put this back in scope.

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

kostyashupenko’s picture

Please correct me if i'm wrong.

I have no permissions to change target branches (because actual target branch should be 11.x). I also have no permissions to close merge requests.

So i created new MR against 11.x and cherry-picked commits of Mike in there. Going to complete this issue soon today

kostyashupenko’s picture

Actually... how to complete this issue?)))

The main problem here is a dependency to `sdc` core module. But... this module is not required by standard profile installation https://git.drupalcode.org/project/drupal/-/blob/11.x/core/profiles/stan...

which means we can't just.. declare dependency in olivero theme to sdc module, rewrite twig files, remove drupal library from olivero.libraries.yml, etc. Main thing is what if on existing web-sites sdc is disabled? So after migration to the latest drupal they will lose tabs visual coz module sdc is not enabled (and actually not sure, maybe they will get fatal error coz olivero have dependency to the module which is disabled). And not sure if there is plans to have sdc module enabled by default in standard profile installation.

Anyways, any thoughts?

smustgrave’s picture

Status: Needs work » Postponed

You can add sdc to standard profile for testing. But technically this would be postponed until sdc is marked stable

xmacinfo’s picture

Deleted comment.

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.

quietone’s picture

quietone’s picture

Project: Drupal core » Olivero
Version: main » 2.0.0
Component: Olivero theme » Code
quietone’s picture

Version: 2.0.0 » 2.x-dev