Skip to content

feat: Storefront Components#16486

Open
Philipp Schuch (Phil23) wants to merge 16 commits into
trunkfrom
15352/storefront-components-release
Open

feat: Storefront Components#16486
Philipp Schuch (Phil23) wants to merge 16 commits into
trunkfrom
15352/storefront-components-release

Conversation

@Phil23
Copy link
Copy Markdown
Contributor

@Phil23 Philipp Schuch (Phil23) commented Apr 28, 2026

Storefront Components

This PR is a further iteration of the previously reverted change: #15651

This change introduces the Storefront Component System, which is a foundation for the upcoming content system and a new, unified extensibility surface for the Storefront. It is built on top of Symfony UX Twig Components and additional asset handling for component script and style files.

It combines four tightly related tracks of work:

  1. A Twig component system (<twig:Sw:Button />) with automatic component namespace registration for bundles.
  2. A new Vite-based component build and dev workflow (including component-focused unit tests and Storybook support).
  3. A new JS component runtime (ShopwareComponent) and global window.Shopware orchestration/event API.
  4. Theme system updates to support runtime CSS custom properties and persisted component import maps.

Major Decision

The biggest change compared to the initial pull request is the decision to not use PHP-based compiling for component assets. All component script and style files are compiled during build time with a new Node-based build process using Vite. Component assets are copied as theme-agnostic files with the usual asset process of Shopware. The files are served via an import map, which is still stored per theme in the theme runtime config.

The full decision is documented in the corresponding ADR.

SaaS PR: https://github.com/shopware/saas/pull/550

Docs PR: shopware/docs#2283

@Phil23 Philipp Schuch (Phil23) added component/storefront domain/framework Responsible for the framework-level code includes core, administration, storefront, and frontends labels Apr 28, 2026
@explore-openapi
Copy link
Copy Markdown

explore-openapi Bot commented Apr 28, 2026

OpenAPI Snapshot

ℹ️ shopware/store-api — schema identical to base trunk

ℹ️ shopware/admin-api — schema identical to base trunk

📋 Additional Information

⚠️ Changes are matching an older version of the schema. Update the branch to make sure that the schema diff is correct.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 97.16535% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.22%. Comparing base (363145d) to head (7339851).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/Storefront/Theme/ThemeCompiler.php 94.50% 11 Missing ⚠️
src/Core/Kernel.php 0.00% 3 Missing ⚠️
src/Storefront/Theme/ThemeScripts.php 95.00% 2 Missing ⚠️
...ont/Theme/Subscriber/PluginLifecycleSubscriber.php 97.61% 1 Missing ⚠️
src/Storefront/Theme/ThemeConfigValueAccessor.php 98.07% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk   #16486      +/-   ##
==========================================
+ Coverage   63.01%   63.22%   +0.21%     
==========================================
  Files        4846     4852       +6     
  Lines      176514   177050     +536     
  Branches     9984     9984              
==========================================
+ Hits       111223   111939     +716     
+ Misses      62354    62174     -180     
  Partials     2937     2937              
Flag Coverage Δ
phpunit-migration 94.34% <100.00%> (+<0.01%) ⬆️
phpunit-unit 58.11% <96.85%> (+0.40%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Phil23 Philipp Schuch (Phil23) force-pushed the 15352/storefront-components-release branch 10 times, most recently from fb891d0 to 198fc8d Compare April 28, 2026 12:28
@github-actions
Copy link
Copy Markdown

Warnings
⚠️ You probably moved or deleted a twig block. This is likely a hard break. Please check your template changes and make sure that deleted blocks are already deprecated.
If you are sure everything is fine with your changes, you can resolve this warning.
Moved or deleted block:
layout_head_javascript_hmr_mode
layout_head_javascript_hmr_dev
layout_head_javascript_prod

@Phil23 Philipp Schuch (Phil23) force-pushed the 15352/storefront-components-release branch 13 times, most recently from 3938918 to 0780156 Compare May 5, 2026 08:37
Comment thread tests/unit/Core/Framework/Plugin/BundleConfigGeneratorTest.php Outdated
Comment thread tests/unit/Core/Framework/Plugin/BundleConfigGeneratorTest.php Outdated
Comment thread src/Core/Kernel.php
Comment thread src/Core/Framework/Plugin/BundleConfigGenerator.php Outdated
Comment thread src/Storefront/Framework/Twig/Components/TwigComponentRenderEventListener.php Outdated
Comment thread src/Storefront/Framework/Twig/Components/TwigComponentRenderEventListener.php Outdated
Comment thread src/Storefront/Framework/Twig/TemplateConfigAccessor.php Outdated
Comment thread src/Storefront/Framework/Twig/TemplateConfigAccessor.php Outdated
Comment thread src/Storefront/Theme/ThemeCompiler.php Outdated
Comment thread src/Storefront/Theme/ThemeCompiler.php
Comment thread src/Storefront/Theme/ThemeCompiler.php
Comment thread src/Storefront/Theme/ThemeConfigValueAccessor.php
@Phil23 Philipp Schuch (Phil23) force-pushed the 15352/storefront-components-release branch from 701b23d to 0d808c2 Compare May 19, 2026 05:49
Comment thread src/Storefront/Theme/ThemeCompiler.php Outdated
Comment thread composer.json
Comment thread src/Storefront/Controller/StorybookController.php
Comment thread src/Core/Framework/Plugin/BundleConfigGeneratorInterface.php Outdated
Comment thread src/Storefront/Theme/ThemeCompiler.php Outdated
Comment thread src/Storefront/DependencyInjection/TwigComponentBundlePass.php Outdated
Comment thread src/Storefront/Framework/Routing/StorybookRouteScopeAllowList.php Outdated
Comment thread src/Storefront/Theme/ThemeCompiler.php
Comment thread src/Storefront/Theme/Subscriber/PluginLifecycleSubscriber.php Outdated
@Phil23 Philipp Schuch (Phil23) added this pull request to the merge queue May 19, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 19, 2026
@Phil23 Philipp Schuch (Phil23) added this pull request to the merge queue May 19, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/storefront domain/framework Responsible for the framework-level code includes core, administration, storefront, and frontends milestone/6.7.11.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants