Automatically define schema for themes

Created on 26 November 2014, about 10 years ago
Updated 11 April 2024, 9 months ago

Problem/Motivation

Themers have to generate schema since we don't provide a default config schema for a theme's THEME.settings.yml

Proposed resolution

  • Add system_config_schema_info_alter() to create definitions for all themes that need one
  • Inherit schema from a theme's base theme since base themes can add settings a theme's settings form - see ThemeSettingsForm::buildForm()

The one issue with this approach is that dynamic adding schema makes static analysis of configuration files for translatable strings difficult. See #2235901-34: Remove custom theme settings from *.info.yml and subsequent comments.

Remaining tasks

  • Agree approach
  • Write patch
  • Review
  • Commit

User interface changes

None

API changes

None

Beta phase evaluation

<!--Uncomment the relevant rows for the issue. -->
🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Theme 

Last updated about 1 hour ago

Created by

🇬🇧United Kingdom alexpott 🇪🇺🌍

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇿New Zealand quietone

    There has been no activity for 9 years here so let's find out if this is still relevant.

    Is this still relevant for Drupal 10?

    Since we need more information to move forward with this issue, I am setting the status to Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

  • Status changed to Needs work 9 months ago
  • 🇬🇧United Kingdom alexpott 🇪🇺🌍

    This issue is still valid and would save themers time and not have to replicate stuff. Yes this is still relevant from Drupal 10.

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    Some work in this area has happened recently in 📌 Add validation constraints to `type: theme_settings` Active .

Production build 0.71.5 2024