carbon-design-system / carbon

A design system built by IBM
https://www.carbondesignsystem.com
Apache License 2.0
7.76k stars 1.8k forks source link

Be more strategic with our Percy snapshot quota #14779

Closed tay1orjones closed 11 months ago

tay1orjones commented 12 months ago

We have a very significant breadth of visual states within the system's components that we need to ensure remain stable and consistent from release to release. Additionally, PRs need to be reviewed to ensure that any visual changes are intentional and not a new defect.

To accomplish this we currently use Percy. Playwright is used to visit each story in the storybook, visually snapshot it, and send the snapshot to be diffed via Percy against baseline snapshots of what's currently in main.

The issue

We have a cap of how many screenshots we can use per month. We need to uncover ways we could be more strategic with the snapshot quota without increasing risk of defects, or negatively impacting the feedback loop of reviewing snapshots on every PR.

Right now, every time Percy diffs snapshots it's roughly 1000 snapshots towards our quota.

Ideas to explore

Ideas marked with ✅ are ones we think could be worth attempting

- [x] Generate ideas to explore
- [x] Explore and implement 1-2 ideas (replace this tasklist item with the ideas we think are most valuable)
- [ ] Reconsider https://github.com/carbon-design-system/carbon-website/issues/3737
tay1orjones commented 11 months ago

Changing the browser width matrix for a subset of the themes worked

https://github.com/carbon-design-system/carbon/pull/14886#issuecomment-1766361581