Loading
Issue #3636686 by jwilson3: Add Rivet theme settings schema
The implementation:
- adds
config/schema/rivet.schema.yml, extending core'stheme_settingstype and mapping every Rivet-specific setting; - constrains settings with fixed options to values supported by the settings form;
- updates boolean defaults inherited from core's theme-settings schema;
- generates a renamed schema for new starterkit subthemes that inherits
rivet.settings; - documents the schema alias required by existing Rivet subthemes; and
- enables strict schema checking and validates both default and submitted settings in the functional test.
Local validation passed:
ddev phpunit tests/src/Functional/RivetAdminThemeSettingsTest.php— 5 tests, 261 assertions;ddev phpstan;ddev phpcs;ddev php -l src/StarterKit.php; andgit diff --check.
Steps to test:
- Install Rivet on a supported Drupal version.
- Confirm
config.typedreports schema forrivet.settingsand the default configuration validates without violations. - Submit every Rivet-specific field at
/admin/appearance/settings/rivet, then validate the saved configuration. - Generate a starterkit subtheme and confirm
config/schema/MACHINE_NAME.schema.ymldefinesMACHINE_NAME.settingsas typerivet.settings. - Install the generated subtheme and confirm its settings validate and the front page renders successfully.