Problem/Motivation

varbase.info.yml installs the front-end and admin themes for every Varbase site:

themes:
  - gin
  - vartheme_bs5

Varbase 11 installs a site template, and there will be several of them, each owning its own themes. Every site template already installs and sets both: varbase_starter sets vartheme_bs5, educare sets vartheme_bs5_educare, horizonaid sets its own, and gin is installed by varbase_admin_base and set as the admin theme by drupal_cms_admin_ui. Both of those are applied by every site template, so the profile does not need to install either theme.

Steps to reproduce

  1. Install Varbase 11 and choose the Educare site template.
  2. drush pm:list --type=theme --status=enabled
  3. vartheme_bs5 is installed although the default theme is vartheme_bs5_educare and nothing uses it.

Proposed resolution

Make the profile's themes an explicit empty list:

# Explicitly provide an empty list of themes: this prevents the installer from
# injecting Stark into it, and lets each site template install and set its own
# front-end and admin themes.
# @see install_profile_info()
themes: []

The key is kept rather than removed, because install_profile_info() injects Stark when a profile declares no themes. This is the same approach drupal_cms_installer takes.

The installer is unaffected: distribution.install.theme is varbase_installer_theme, whose base theme is claro. The themes also stay downloadable, since the profile requires drupal/varbase_starter.

Verified from a dropped database, with both site templates: the correct default theme, admin: gin with Gin assets rendering on /admin/content, no Stark installed, front page 200.

Remaining tasks

  • ✅ File an issue
  • ➖ Addition/Change/Update/Fix
  • ➖ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Developer Documentation
  • ➖ User Guide Documentation
  • ➖ Reviewed by human
  • ➖ Code review by maintainers
  • ➖ Full testing and approval
  • ➖ Credit contributors
  • ➖ Review with the product owner
  • ➖ Release notes snippet
  • ❌ Release

User interface changes

  • None visible. Each site template continues to set its own front-end and admin themes; only the profile's redundant installation of them is dropped.

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • The Varbase profile no longer installs the front-end or admin theme. Each site template installs and sets its own.

Issue fork varbase-3614696

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Issue summary: View changes

rajab natshah’s picture

Issue summary: View changes

  • rajab natshah committed a0325029 on 11.0.x
    feat: #3614696 Let each site template install and set its own front-end...