Skip to content

Add a theme_dev_mode toggle via scaffolded files #1048

@deviantintegral

Description

@deviantintegral

While Drupal now has better features in this area (https://www.drupal.org/project/drupal/issues/3278493), it doesn't address all of the tweaks that a developer might want to make to settings when actively developing on the front-end. Let's set up some additional files to be scaffolded into the sites directory to support this.

Requirements

  • The default behaviour must not affect existing sites that are upgrading drainpipe - meaning, we don't default anything to "on" by virtue of IS_DDEV or anything like that.
  • By default, debugging is off and caches are on. This follows a best practice of normally developing and testing with caching enabled, and selectively disabling it when needed.
  • Do not require a ddev restart to change the mode. This means no use of ddev config - at most, .env settings or settings.php settings.
  • When theme dev mode is on:
    • Turn on twig debugging
    • Enable the null cache bin
    • Disable the theme render and related caches
    • Enable cache tags in http response headers
    • Stepping through twig templates in IDEs should work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions