Add SDC Debugging emojis to all templates

Created on 11 April 2024, about 1 year ago

Problem/Motivation

When you turn on theme debugging with a single directory component you see the most powerful feature of SDC's, an emoji to help you path find templates.

This would be helpful in all templates.

Steps to reproduce

Create an SDC
Turn on Twig development mode here /admin/config/development/settings
Inspect page with SDC
See screenshot

Proposed resolution

Add similar debugging info to all templates.

Remaining tasks

Determine best way to get emojiForString https://git.drupalcode.org/project/drupal/-/blob/11.x/core/lib/Drupal/Co...
into all templates in debug mode.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

Feature request
Status

Active

Version

11.0 🔥

Component
Theme 

Last updated 1 day ago

Created by

🇺🇸United States nicxvan

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

Comments & Activities

  • Issue created by @nicxvan
  • 🇺🇸United States mherchel Gainesville, FL, US

    Big +1 on this!

  • First commit to issue fork.
  • 🇺🇸United States Taiger Bend, Oregon

    Is there a discussion around the bad practice of using emojis in css? This seems terrible and I can't find any documentation or discussion on this.
    I don't recognize half of the emojis being used even though I am a native English speaker.

  • 🇺🇸United States nicxvan

    Is there a discussion around the bad practice of using emojis in css?

    These are not in css, they are in the debug code html so they only show up when you have development mode turned on.

    I don't recognize half of the emojis being used even though I am a native English speaker.

    That actually doesn't matter for the use case, there is one where the template starts and one where it ends so it makes it easy to see what it is encompassing when debugging. It's only for way finding and they are random.

    This seems terrible and I can't find any documentation or discussion on this.

    I've found this to be extremely helpful in seeing where the templates begin and end, you find the one template you're looking for, then you don't have to read all of the end template comments, you just find the matching emoji whatever it is.

  • 🇺🇸United States Taiger Bend, Oregon

    I can see that it could make it easier for debugging as these only appear in the comments. I have never had an issue with twig comment blocks; as they are now but maybe that is just me.

Production build 0.71.5 2024