Commit 35a63e8
authored
chore(css-modules): 🤖 support local visual regression testing via docker (#931)
* chore: 🤖 add pkg vite-plugin-static-copy
* chore: 🤖 use vite setup to copy css to distribution
* refactor: 💡 make static copy process common for cjs and esm
* docs: 📝 about css modules
* style: 💄 add Button css module
* style: 💄 assign css module to component Button
* chore: 🤖 add class-variance-authority and clsx
* style: 💄 migrate styled component to css modules
* style: 💄 migrate styled component to css modules
* refactor: 💡 token generator
* chore: 🤖 storybook support for css modules
* chore: 🤖 add button stories for each state, e.g. primary, secondary, etc
* chore: 🤖 add changeset
* chore: 🤖 remove comment
* chore: 🤖 update changeset
* chore: 🤖 declare css files as sideEffects
* refactor: 💡 make class utility libraries, e.g. cva; actual dependencies
* chore: 🤖 add TODO button
* style: 💄 possible typo, e.g. make similar bg size as others
* refactor: 💡 role button is redundant per the ARIA in HTML spec, add aria-busy={loading}
* chore: 🤖 format
* refactor: 💡 generate tokens, e.g. theme config shared file as json, remove generate quotes,e tc
* chore: 🤖 add TODO regarding removal of styled components for the future, e.g. remove babel plugins
* chore: 🤖 add migration note to changeset
* refactor: 💡 forward props (delegated)
* fix: 🐛 checkout design tokens from main
* fix: 🐛 if a consumer passes className, it would overwrite the variant classes
* fix: 🐛 avoid double colmns
* chore: 🤖 regenerate tokens
* fix: 🐛 replace missing by global focus token
* fix: 🐛 focus rings restored for keyboard users
* refactor: 💡 follow BEM naming convention
* chore: 🤖 include BEM rule in llm conventions
* fix: 🐛 empty token
* fix: 🐛 .button > span selector to explicit .button__label class
* chore: 🤖 format
* fix: 🐛 claude review, missing prefers-reduced-motion support for the shimmer animation.
* fix: 🐛 add line
* refactor: 💡 remove sideEffects redundancy
* fix: 🐛 package.json typo
* style: 💄 missing background repeat, as commented by claude PR
* fix: 🐛 Changed both attributes to use || undefined:
- aria-disabled={(disabled || loading) || undefined}
- aria-busy={loading || undefined} due to accessibility
* chore: 🤖 initial playwright Docker setup
* chore: 🤖 create docker ignore file
* chore: 🤖 update gitignore to filter out snapshots, e.g. darwin
* chore: 🤖 create a docker compose to ease orchestration
* chore: 🤖 update playwright-docker script port to 8282
* test: 💍 create button visual regression test covering all states
* docs: 📝 visual regression playwright setup
* fix: 🐛 bash syntax error in the playwright-docker script
* docs: 📝 visual regression docker requirement
* test: 💍 added the aria-busy assertion
* chore: 🤖 track visual regression snapshots
* test: 💍 preevnts shimmer animation from causing noin-deterministic screenshot comparisons
* chore: 🤖 removed docker stop block, and unused DOCKER_INSTANCE_NAME var. The docker rm -f playwright-ui command handles both stopping and removing the container
* refactor: 💡 added role="group" to ButtonGroupWrapper (semantically correct for a group of related buttons) and updated the test to use page.getByRole('group')
* docs: 📝 amend typo (separatily/separately)
* test: 💍 throw if null
* chore: 🤖 map source to docker
* fix: 🐛 button attribute values
* chore: 🤖 update snapshots1 parent f6a2cd2 commit 35a63e8
File tree
54 files changed
+704
-11
lines changed- .scripts/bash
- docs/tests
- src/components/ButtonGroup
- tests
- buttons
- button.spec.ts-snapshots
- overview.spec.ts-snapshots
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
54 files changed
+704
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
| 19 | + | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
20 | 42 | | |
21 | 43 | | |
22 | 44 | | |
| |||
37 | 59 | | |
38 | 60 | | |
39 | 61 | | |
40 | | - | |
| 62 | + | |
41 | 63 | | |
42 | 64 | | |
43 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | | - | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
0 commit comments