@happyvertical/smrt-playground 0.55.20 → 0.55.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +48 -0
- package/dist/svelte/PlaygroundHost.svelte +9 -9
- package/package.json +2 -2
package/AGENTS.md
CHANGED
|
@@ -50,3 +50,51 @@ The `smrt playground` commands (`init`, `dev`, `list`) consume this package. The
|
|
|
50
50
|
## Visual baselines
|
|
51
51
|
|
|
52
52
|
The host's theme gallery has Chromium-on-macOS screenshot baselines. Update with `pnpm --filter smrt-playground-host test:e2e:update-snapshots`; details in [agents/host.md](agents/host.md). The spec skips pixel comparison off darwin (CI is Linux).
|
|
53
|
+
|
|
54
|
+
## Visual regression (styling wave 2)
|
|
55
|
+
|
|
56
|
+
`Playground Visual Regression` in `Pull Request Validation` compares 120 Linux
|
|
57
|
+
Chromium screenshots: Base Controls, Feedback & Overlays, Collections & Content
|
|
58
|
+
Lists, Data Table, Calendar and Styleless Mode × Material/Glass/Studio/SMRT/
|
|
59
|
+
HappyVertical × light/dark × styled/unstyled. It is a required gate when
|
|
60
|
+
`packages/*/src/**/*.svelte`, `packages/*/src/**/playground.ts`,
|
|
61
|
+
`smrt-ui/src/themes/**`, `smrt-ui/src/styles/**`,
|
|
62
|
+
playground files, the workflow/setup action, or dependency manifests change.
|
|
63
|
+
The job has a six-minute wall-clock budget and uploads `playground-visual-diffs`
|
|
64
|
+
(expected/actual/diff PNGs, HTML report and traces) on failure.
|
|
65
|
+
|
|
66
|
+
Baselines live in `e2e/__screenshots__/<preset>/<scheme>/<entry>-<mode>.png`.
|
|
67
|
+
Rendering uses the pinned Playwright 1.63.0 Noble **Linux AMD64** image in
|
|
68
|
+
`e2e/Dockerfile`, a 1440×1000 viewport at 1×, en-US, America/Edmonton, a fixed
|
|
69
|
+
2026-10-13 clock, self-hosted SMRT and HappyVertical fonts, reduced motion and
|
|
70
|
+
an unlayered animation/transition override. The screenshot target is the whole
|
|
71
|
+
preview stage, including content taller than the viewport. The comparison allows
|
|
72
|
+
at most 0.01% changed pixels with a 0.1 per-pixel threshold; do not widen it to
|
|
73
|
+
accept an unexplained regression.
|
|
74
|
+
|
|
75
|
+
After `pnpm install --frozen-lockfile` and `pnpm build`, with Docker running and
|
|
76
|
+
port 5560 free, run from the repository root:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
pnpm --filter smrt-playground-host test:visual:container
|
|
80
|
+
pnpm --filter smrt-playground-host test:visual:container --update-snapshots
|
|
81
|
+
# Focus a deliberate styling change:
|
|
82
|
+
pnpm --filter smrt-playground-host test:visual:container --grep 'material/light/base-controls'
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The wrapper builds the pinned renderer, starts the actual playground dev host,
|
|
86
|
+
renders in Linux, writes results into the workspace and stops its host. Native
|
|
87
|
+
`test:visual` and `test:visual:update` also exist for that Linux environment;
|
|
88
|
+
**both refuse macOS** before Playwright can write even a missing baseline.
|
|
89
|
+
Never commit macOS-rendered PNGs. Other Linux distributions/browser versions are
|
|
90
|
+
not the baseline environment: use the container on those systems too.
|
|
91
|
+
Default comparison uses `updateSnapshots: 'none'`, so missing files fail closed.
|
|
92
|
+
|
|
93
|
+
To generate on GitHub, dispatch `Pull Request Validation` on the desired branch
|
|
94
|
+
with `update_visual_baselines=true`, download `playground-visual-baselines` into
|
|
95
|
+
`packages/smrt-playground/e2e/__screenshots__/`, inspect the changed PNGs, rerun
|
|
96
|
+
comparison and commit explicit baseline paths alongside the intentional change.
|
|
97
|
+
The workflow never commits or approves its own updates. PR runs always compare.
|
|
98
|
+
Because `pull_request_target` loads trusted base YAML, workflow edits take effect
|
|
99
|
+
for PR events after merging; manual dispatch on the feature branch can exercise
|
|
100
|
+
the new visual job before that. Wave-2 changes should cite the job/run URL.
|
|
@@ -576,7 +576,7 @@ function selectEntry(entry: ResolvedSmrtPlaygroundEntry) {
|
|
|
576
576
|
gap: 1.4rem;
|
|
577
577
|
padding: 1.25rem;
|
|
578
578
|
overflow: hidden;
|
|
579
|
-
border-right:
|
|
579
|
+
border-right: var(--smrt-hairline);
|
|
580
580
|
background: var(--smrt-color-surface-container-low);
|
|
581
581
|
color: var(--smrt-color-on-surface);
|
|
582
582
|
}
|
|
@@ -635,7 +635,7 @@ function selectEntry(entry: ResolvedSmrtPlaygroundEntry) {
|
|
|
635
635
|
.search-field input {
|
|
636
636
|
width: 100%;
|
|
637
637
|
padding: 0.65rem 0.75rem;
|
|
638
|
-
border:
|
|
638
|
+
border: var(--smrt-hairline);
|
|
639
639
|
border-radius: 0.55rem;
|
|
640
640
|
background: var(--smrt-color-surface);
|
|
641
641
|
color: var(--smrt-color-on-surface);
|
|
@@ -678,7 +678,7 @@ function selectEntry(entry: ResolvedSmrtPlaygroundEntry) {
|
|
|
678
678
|
align-items: center;
|
|
679
679
|
justify-content: space-between;
|
|
680
680
|
padding: 0 0 0.7rem;
|
|
681
|
-
border-bottom:
|
|
681
|
+
border-bottom: var(--smrt-hairline);
|
|
682
682
|
font-size: 0.82rem;
|
|
683
683
|
font-weight: 650;
|
|
684
684
|
}
|
|
@@ -747,7 +747,7 @@ function selectEntry(entry: ResolvedSmrtPlaygroundEntry) {
|
|
|
747
747
|
align-items: end;
|
|
748
748
|
gap: 0.5rem;
|
|
749
749
|
padding-top: 0.8rem;
|
|
750
|
-
border-top:
|
|
750
|
+
border-top: var(--smrt-hairline);
|
|
751
751
|
}
|
|
752
752
|
|
|
753
753
|
.theme-controls :global(.smrt-theme-switcher__label) {
|
|
@@ -777,7 +777,7 @@ function selectEntry(entry: ResolvedSmrtPlaygroundEntry) {
|
|
|
777
777
|
align-items: center;
|
|
778
778
|
justify-content: space-between;
|
|
779
779
|
gap: 1rem;
|
|
780
|
-
border-bottom:
|
|
780
|
+
border-bottom: var(--smrt-hairline);
|
|
781
781
|
}
|
|
782
782
|
|
|
783
783
|
.breadcrumbs {
|
|
@@ -839,7 +839,7 @@ function selectEntry(entry: ResolvedSmrtPlaygroundEntry) {
|
|
|
839
839
|
display: grid;
|
|
840
840
|
gap: 0.55rem;
|
|
841
841
|
padding-bottom: clamp(1.75rem, 4vw, 3rem);
|
|
842
|
-
border-bottom:
|
|
842
|
+
border-bottom: var(--smrt-hairline);
|
|
843
843
|
}
|
|
844
844
|
|
|
845
845
|
.package-landing > header p {
|
|
@@ -894,7 +894,7 @@ function selectEntry(entry: ResolvedSmrtPlaygroundEntry) {
|
|
|
894
894
|
gap: 1.25rem;
|
|
895
895
|
padding: 1.15rem 0;
|
|
896
896
|
border: 0;
|
|
897
|
-
border-bottom:
|
|
897
|
+
border-bottom: var(--smrt-hairline);
|
|
898
898
|
background: transparent;
|
|
899
899
|
text-align: left;
|
|
900
900
|
cursor: pointer;
|
|
@@ -977,7 +977,7 @@ function selectEntry(entry: ResolvedSmrtPlaygroundEntry) {
|
|
|
977
977
|
min-height: 30rem;
|
|
978
978
|
padding: clamp(1rem, 2.2vw, 2rem);
|
|
979
979
|
overflow: auto;
|
|
980
|
-
border:
|
|
980
|
+
border: var(--smrt-hairline);
|
|
981
981
|
border-radius: 1rem;
|
|
982
982
|
background: var(--smrt-color-surface);
|
|
983
983
|
color: var(--smrt-color-on-surface);
|
|
@@ -1032,7 +1032,7 @@ function selectEntry(entry: ResolvedSmrtPlaygroundEntry) {
|
|
|
1032
1032
|
position: static;
|
|
1033
1033
|
height: auto;
|
|
1034
1034
|
border-right: 0;
|
|
1035
|
-
border-bottom:
|
|
1035
|
+
border-bottom: var(--smrt-hairline);
|
|
1036
1036
|
}
|
|
1037
1037
|
|
|
1038
1038
|
.catalog-scroll {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-playground",
|
|
3
|
-
"version": "0.55.
|
|
3
|
+
"version": "0.55.23",
|
|
4
4
|
"smrtJsdoc": "strict",
|
|
5
5
|
"description": "Shared playground discovery, runtime, and host components for SMRT UI packages",
|
|
6
6
|
"type": "module",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@happyvertical/smrt-ui": "0.55.
|
|
32
|
+
"@happyvertical/smrt-ui": "0.55.23",
|
|
33
33
|
"fast-glob": "3.3.3",
|
|
34
34
|
"tsx": "^4.23.13"
|
|
35
35
|
},
|