8000 feat(sylius): Sylius-Standard shop sandbox + Playwright suite by Klehm · Pull Request #97 · Klehm/content-blocks-project · GitHub
[go: up one dir, main page]

Skip to content

feat(sylius): Sylius-Standard shop sandbox + Playwright suite - #97

Open
Klehm wants to merge 9 commits into
feat/sylius-pluginfrom
feat/sylius-shop-sandbox
Open

Klehm wants to merge 9 commits into
feat/sylius-pluginfrom
feat/sylius-shop-sandbox

Conversation

@Klehm
@Klehm Klehm commented Oct 21, 2026
Copy link
Copy Markdown
Owner

Stacked on #96. Merge that one first; GitHub will then retarget this PR to master.

What

apps/content-blocks-sylius-shop-sandbox: a Sylius-Standard 2.3 shop with the Sylius plugin, i18n and SEO installed from the path repositories.

  • make up DEMO=shop serves it on port 8006. On the first run it loads Sylius's default fixtures, then app:demo:load, which adds:
    • the Fashion homepage built with the builder (hero with a featured product and add-to-cart, a new-arrivals carousel, categories, jeans of a taxon);
    • an About us page in English and French;
    • a size guide on a product.
  • The admin assets go through Sylius-Standard's own Encore build, and Flex wrote the Stimulus controllers.
  • Two monorepo-only artefacts are commented in place: resolve.modules and a pinned webpack (the latest webpack breaks @symfony/stimulus-bridge 3.2).

Playwright suite playwright.sylius.config.js (port 8007, _e2e database, 3 specs):

  • the homepage replaced by products picked through the autocomplete, then published;
  • a CMS page created in the admin, built, published and served by its slug;
  • a product's content reached from the product edit screen and previewed on the product page.

The CI job sylius-e2e-tests gates the split.

Found along the way

The bugs below are fixed in #96: running the plugin in a real shop exposed them, where sylius/test-application hid them.

  • The block sidebar answered 500, because Sylius-Standard mounts no ux_live_component route.
  • Product and taxon content was printed escaped.
  • Translation targets were read from the current channel, which the admin does not have.

Tests

3/3 Playwright specs pass locally. PHPUnit passes 71/71 on Sylius 2.0, 2.1, 2.2 and 2.3.

🤖 Generated with Claude Code

Klehm and others added 9 commits October 21, 2026 17:48
apps/content-blocks-sylius-shop-sandbox is Sylius-Standard 2.3 with the
Sylius plugin, i18n and SEO from the path repositories:

- `make up DEMO=shop` (port 8006) installs it, loads Sylius's default
  fixtures, then app:demo:load: the Fashion homepage built with the builder,
  an About us page in English and French, a size guide on a product.
- Admin assets built by its own Encore config; Flex wrote the controllers.
  Two monorepo artefacts are commented in place (resolve.modules, a pinned
  webpack).

playwright.sylius.config.js (port 8007, `_e2e` database) runs three specs on
it: the homepage replaced by chosen products, a CMS page created and served
by slug, a product's content previewed on its page. CI job sylius-e2e-tests
gates the split.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sylius's default fixtures purge sylius_core.images_dir on load. The e2e
reset loaded them into the `_e2e` database but the shared public/media/image,
so every run deleted the demo's product images and the demo showed broken
images. The directory now takes SANDBOX_SUFFIX, like the database and the
uploads; demo.sh empties each sandbox's own upload directory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
slider.js now gives its arrows, dots and ARIA roles to any element with
data-cb-slider and a data-cb-slider-track child, so a block gets the
section slider's controls without a second implementation.

The controls are redrawn: round tinted arrows with a chevron icon, dots
drawn by ::before with the current one stretched into a pill. Stops now
end at the last slide's edge: a slide's negative margin made an extra dot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Catalog blocks are swapped in place in the builder's preview: the Live
  add-to-cart form and the carousel attach to injected markup.
- The product carousel is a core slider host: arrows, dots, no scrollbar.
- With klehm/content-blocks-media: routes under the admin prefix, and shop
  administrators manage the library unless the host names its manager.
- Shop sandbox: the media package, a slider section and a Lookbook folder
  seeded from Sylius's own fixture photos (no network at seed time).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The builder's images go through the shop's LiipImagine: WebP sized for
  their box with a srcset, media library thumbnails included. Files outside
  public/, SVG and GIF pass through; images: false turns it off.
- The new slider look moves from the core to a plugin stylesheet, linked by
  a hookable: the core's controls are back to what they were. The core keeps
  the slider on any host and the extra-dot fix.
- AdminMediaManagerPass becomes DefaultAliasPass, used for both seams.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The locales service called its provider as soon as the container built it,
and some twenty services take it, the block renderer among them: booting
anything that touches Twig ran the provider. A provider reading the database
(the Sylius plugin's) then broke every console command run without one,
cache:clear in a composer install included.
composer audit flagged six advisories published against Sylius < 2.3.2.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0