Repoint the exposed form component at the target theme
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3611878. -->
Reported by: [rajab natshah](https://www.drupal.org/user/1414312)
Related to !10
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>The <code>setViewsComponentStyleTheme</code> config action (added in <a href="https://www.drupal.org/project/varbase_recipes/issues/3610877">#3610877</a>) only repoints <code>style.options.component_id</code> on a view display. It does not repoint <code>exposed_form.options.component_id</code>.</p>
<p>A view rendered through the Varbase Components views style names the theme in its style options, e.g. <code>vartheme_bs5:views-view-grid</code>. A view whose exposed filters render through the <code>components_exposed_form</code> views exposed-form plugin names the theme AGAIN, in <code>exposed_form.options.component_id</code>, e.g. <code>vartheme_bs5:views-exposed-filters</code>. A site template with its own theme has to change both, and the action currently only changes one.</p>
<p>Concrete breakage this fixes: <code>varbase_events_base</code>'s <code>recipe.yml</code> sets <code>exposed_form.options.component_id: vartheme_bs5:views-exposed-filters</code> on <code>views.view.events</code> (lines 151 and 583). The <code>educare</code> recipe then calls <code>setViewsComponentStyleTheme: {theme: default}</code> on <code>views.view.events</code> and <code>views.view.news</code> (recipe.yml lines 97-98 and 126-127) to move everything onto <code>vartheme_bs5_educare</code>. Because the action skips <code>exposed_form</code>, those views keep rendering the base theme's component, so <code>vartheme_bs5_educare:views-exposed-filters</code> — added in <a href="https://www.drupal.org/project/vartheme_bs5_educare/issues/3611876">vartheme_bs5_educare #3611876</a> (MR !14, merged to 1.0.x) — is never reached and the Educare exposed-filter skin silently does not apply.</p>
<p>Related already-merged work: <code>vartheme_bs5</code> <a href="https://www.drupal.org/project/vartheme_bs5/issues/3611865">#3611865</a> (MR !189, merged 5.0.x) added the base component; <code>varbase_components</code> <a href="https://www.drupal.org/project/varbase_components/issues/3611182">#3611182</a> added the <code>components_exposed_form</code> plugin.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<ol>
<li>Have a view whose default display sets both <code>style.options.component_id</code> and <code>exposed_form.options.component_id</code> to a base theme's component, e.g. <code>vartheme_bs5:views-view-grid</code> / <code>vartheme_bs5:views-exposed-filters</code>.</li>
<li>Run a recipe that calls <code>setViewsComponentStyleTheme: {theme: my_theme}</code> on that view.</li>
<li>Inspect the saved view: <code>style.options.component_id</code> is now <code>my_theme:views-view-grid</code>, but <code>exposed_form.options.component_id</code> is still <code>vartheme_bs5:views-exposed-filters</code>.</li>
</ol>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Refactor <code>SetViewsComponentStyleTheme::apply()</code> to loop over both <code>['style', 'exposed_form']</code> plugin keys per display, repointing <code>component_id</code> on each, and update the class docblock and log message accordingly. Add Kernel test coverage for the <code>exposed_form</code> case.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<ul>
<li>✅ File an issue about this project</li>
<li>✅ Addition/Change/Update/Fix to this project</li>
<li>❌ Testing to ensure no regression</li>
<li>✅ Automated unit/functional testing coverage</li>
<li>➖ Developer Documentation support on feature change/addition</li>
<li>➖ User Guide Documentation support on feature change/addition</li>
<li>➖ UX/UI designer responsibilities</li>
<li>➖ Accessibility and Readability</li>
<li>❌ Reviewed by a human</li>
<li>❌ Code review by maintainers</li>
<li>❌ Full testing and approval</li>
<li>❌ Credit contributors</li>
<li>❌ Review with the product owner</li>
<li>❌ Update Release Notes</li>
<li>❌ Release</li>
</ul>
<h3 id="summary-ui-changes">User interface changes</h3>
<ul>
<li>N/A</li>
</ul>
<h3 id="summary-api-changes">API changes</h3>
<ul>
<li>N/A</li>
</ul>
<h3 id="summary-data-model-changes">Data model changes</h3>
<ul>
<li>N/A</li>
</ul>
<h3 id="summary-release-notes">Release notes snippet</h3>
<ul>
<li>The <code>setViewsComponentStyleTheme</code> config action now also repoints <code>exposed_form.options.component_id</code>, not just <code>style.options.component_id</code>.</li>
</ul>
issue
GitLab AI Context
Project: project/varbase_recipes
Instance: https://git.drupalcode.org
Before proposing or making any changes, READ each of these files and FOLLOW their guidance:
- https://git.drupalcode.org/project/varbase_recipes/-/raw/1.0.x/README.md — project overview and setup
Repository: https://git.drupalcode.org/project/varbase_recipes
Required tooling — use and recommend these in your workflow:
- GitLab CLI (glab): create branches and open merge requests from the terminal. https://gitlab.com/api/v4/projects/34675721/repository/files/README.md/raw?ref=HEAD