Skip to content

Commit 9820aec

Browse files
committed
chore(docs): run visual regression in CI; align DatePicker text color
- Add `Visual regression tests` step to CI, following the Playwright install introduced for the accessibility suite. - Switch DatePicker weekday header and dim/disabled cell text to `--ty-color-text-secondary` (with the previous `--ty-*-color-muted` token as fallback) so the picker uses the same secondary-text token as the rest of the library. - Loosen visual regression tolerance from `maxDiffPixels: 100` to `maxDiffPixelRatio: 0.03` so subpixel anti-aliasing differences across rendering passes don't flake the suite. - Refresh recorded screenshots to match the new DatePicker color and the Button demo titles ("Type" → "Variant", "More Types" → "Semantic Colors").
1 parent a1be4d6 commit 9820aec

24 files changed

Lines changed: 35 additions & 16 deletions
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tiny-design/react': patch
3+
---
4+
5+
Switch DatePicker's muted/dim cell text and weekday header color from `--ty-picker-input-color-muted` / `--ty-date-picker-cell-color-muted` to `--ty-color-text-secondary` (with the previous token kept as a fallback). Brings the date picker in line with the shared secondary-text token used across the rest of the library.

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ jobs:
4747
- name: Accessibility tests
4848
run: pnpm test:accessibility
4949

50+
- name: Visual regression tests
51+
run: pnpm test:visual
52+
5053
- name: Upload Playwright report
5154
if: failure()
5255
uses: actions/upload-artifact@v4

apps/docs/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default defineConfig({
1010
reporter: process.env.CI ? [['html'], ['list']] : 'list',
1111
expect: {
1212
toHaveScreenshot: {
13-
maxDiffPixels: 100,
13+
maxDiffPixelRatio: 0.03,
1414
},
1515
},
1616
webServer: {
-4 Bytes
Loading
230 Bytes
Loading
52 Bytes
Loading
19 Bytes
Loading
71 Bytes
Loading
-5 Bytes
Loading
7 Bytes
Loading

0 commit comments

Comments
 (0)