Skip to content

[Toolkit] Fix the drawer snapshots broken by twig-tailwind-extra 1.5.0 - #4042

Merged
Kocal merged 1 commit into
symfony:3.xfrom
Kocal:fix/toolkit-drawer-snapshots-tailwind-extra
Oct 5, 2026
Merged

Kocal merged 1 commit into
symfony:3.xfrom
Kocal:fix/toolkit-drawer-snapshots-tailwind-extra

Conversation

@Kocal

@Kocal Kocal commented Oct 5, 2026

Copy link
Copy Markdown
Member
Q A
Bug fix? no
New feature? no
Deprecations? no
Documentation? no
Issues
License MIT

tales-from-a-dev/twig-tailwind-extra 1.5.0 (released 2026-10-04) changed how |tailwind_classes resolves conflicting utilities: it now drops max-h-none when max-h-[80vh] comes after it, which broke the 3 rendering snapshots of the shadcn/drawer recipe and failed every PHP CI job. I regenerated the snapshots; the drawer screenshots themselves didn't change, only the class list in the rendered HTML.

While regenerating them, bin/update_toolkit_tests.sh failed with jq: parse error: Invalid numeric literal. The cause: when pnpm-lock.yaml has changed (for example after a pull), pnpm 11 checks dependencies before running pnpm exec and prints its install report on stdout ahead of Playwright's JSON output, so jq ends up trying to parse pnpm's report instead. The script now has Playwright's JSON reporter write to a temporary file via PLAYWRIGHT_JSON_OUTPUT_FILE, and jq reads that file instead of stdout.

| Q              | A
| -------------- | ---
| Bug fix?       | no
| New feature?   | no
| Deprecations?  | no
| Documentation? | no
| Issues         |
| License        | MIT

`tales-from-a-dev/twig-tailwind-extra` 1.5.0 (released 2026-10-04) changed how `|tailwind_classes` resolves conflicting utilities: it now drops `max-h-none` when `max-h-[80vh]` comes after it, which broke the 3 rendering snapshots of the `shadcn/drawer` recipe and failed every PHP CI job. I regenerated the snapshots; the drawer screenshots themselves didn't change, only the class list in the rendered HTML.

While regenerating them, `bin/update_toolkit_tests.sh` failed with `jq: parse error: Invalid numeric literal`. The cause: when `pnpm-lock.yaml` has changed (for example after a pull), pnpm 11 checks dependencies before running `pnpm exec` and prints its install report on stdout ahead of Playwright's JSON output, so `jq` ends up trying to parse pnpm's report instead. The script now has Playwright's JSON reporter write to a temporary file via `PLAYWRIGHT_JSON_OUTPUT_FILE`, and `jq` reads that file instead of stdout.
@Kocal Kocal self-assigned this Oct 5, 2026
@carsonbot carsonbot added Toolkit Status: Needs Review Needs to be reviewed labels Oct 5, 2026
@Kocal
Kocal merged commit 019871a into symfony:3.x Oct 5, 2026
44 checks passed
@Kocal
Kocal deleted the fix/toolkit-drawer-snapshots-tailwind-extra branch October 5, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants