feat: #3610649 Let users choose a site template in the installer

Issue: https://www.drupal.org/project/varbase/issues/3610649

What / why

RecipeKit's own installer form (\Drupal\RecipeKit\Installer\Form\SiteTemplateForm) cannot be used directly on Varbase: it builds its site-template list by calling Recipe::createFromDirectory() on every type: Site recipe, which runs core's ConfigConfigurator pre-flight against the active configuration. In the early installer that active configuration is the on-disk InstallStorage, so any Varbase sub-recipe shipping a config object a module also provides (e.g. core.entity_view_mode.media.full from varbase_media_base) throws RecipePreExistingConfigException and kills the installer before a template can be chosen. Loosening config.strict across the varbase_* recipes was tried and rejected separately — it let the picker render but broke installation (theme not installed, site left on stark with a 500).

This MR adds a Varbase-owned installer form, Drupal\varbase\Installer\Form\SiteTemplateForm, which lists templates by parsing each recipe.yml for its metadata (name, description, screenshot, extra) instead of constructing the Recipe object, so the config pre-flight never runs. The chosen recipe is still applied normally by RecipeKit's applyRecipes(). No changes to any varbase_* recipe.

Test results (Drupal 11.4, Varbase 11.0.x, DDEV, real browser)

  • Installer now shows "Choose a site template" listing Varbase Starter and Educare, with screenshots and descriptions, no errors.
  • Round 1 (Varbase Starter): install completes; default theme vartheme_bs5; 5 canvas pages, 14 nodes; front page HTTP 200.
  • Round 2 (Educare): install completes; default theme vartheme_bs5_educare; 13 canvas pages, 14 nodes, 76 media; front page HTTP 200.
  • Both from a dropped database (fresh install each time).
  • Side effect: the recipe-validation warnings RecipeKit's form surfaced (varbase_ai_editor_assistant, varbase_ai_taxonomy_tagging) no longer appear, since recipes are no longer constructed just to be listed.

AI-Generated: Yes (Used Claude Code to draft the SiteTemplateForm class, the varbase.info.yml forms-list change, and this MR description; reviewed by rajab-natshah before opening.)

Checkpoints

  • File an issue about this project
  • Addition/Change/Update/Fix to this project
  • Testing to ensure no regression
  • Automated unit/functional testing coverage
  • Developer Documentation support on feature change/addition
  • User Guide Documentation support on feature change/addition
  • UX/UI designer responsibilities
  • Accessibility and Readability
  • Reviewed by a human
  • Code review by maintainers
  • Full testing and approval
  • Credit contributors
  • Review with the product owner
  • Update Release Notes
  • Release
Edited by Rajab Natshah

Merge request reports

Loading