Breaking
7.0.0happo v7: stricter defaults, removed options
This release turns on by default the checks that used to be opt-in, removes config options and CLI flags Happo no longer needs, fails on config options it doesn't recognize, and raises the minimum Node and Storybook versions. Expect the first run after upgrading to report diffs for examples with outlines or box shadows at their edges, and expect the projects that run for the same commit to post a single Happo status check. See the upgrade guide at https://docs.happo.io/docs/upgrading-to-v7 and the announcement at https://happo.io/blog/happo-v7.
Breaking changes
- Block approval by default on render errors, new accessibility violations and pages that start to scroll sideways: a config without
blockApprovalnow turns on every condition, and a condition left out of ablockApprovalobject is on too; set one tofalseto allow approval despite it. A page that already scrolled sideways before the upgrade doesn't block [by @trotzig in #178] - Default
grouptotrue, so the projects that run for the same commit combine into one job with a singleHappostatus check instead of aHappo (<project>)check each; requireHappoin branch protection, or setgroup: falseto keep a project's own job and check [by @trotzig in #178] - Default
includeOutlinesAndShadowstotrue, so screenshots grow to hold the outlines and outer box shadows at the edge of an example; expect a diff for each such example on the first run, or set it tofalseon a target to crop to the elements' boxes [by @trotzig in #178] - Default
detectHorizontalOverflowtotrue, so a page that starts to scroll sideways is a diff even when its pixels are the same; a page that already overflowed is flagged but doesn't become a diff, andfalseon a target turns the check off [by @trotzig in #178] - Enable deep compare by default: a config without
deepComparenow compares with{ compareThreshold: 0.002, diffAlgorithm: 'color-delta' }, which takes the place of a threshold set for the project on happo.io; setdeepCompare: falseto keep using the project's settings [by @trotzig in #178] - Default
allowedHostnamesto an empty list, so a target blocks every external request unless the config names the hostnames it needs;ios-safariandipad-safaritargets are unaffected [by @trotzig in #178] - Default
integration.autoApplyPseudoStateAttributestotruefor Cypress and Playwright; set it tofalseto manage thedata-happo-*attributes yourself [by @trotzig in #178] - Reject unknown config options with an error, with a "did you mean" suggestion for likely typos, so a config with a removed or misspelled option now fails instead of being ignored; every problem in the config is reported at once [by @trotzig in #178]
- Remove the
target.chunks,useFullPageFallbackForTallScreenshotsandgithubApiUrlconfig options, and the--githubTokenand--skippedExamplesCLI flags; use--skipinstead of--skippedExamples, and drop the rest [by @trotzig in #178] - Stop posting Happo statuses as pull request comments from the CLI: happo.io posts statuses itself, for github.com and GitHub Enterprise [by @trotzig in #178]
- Chunk every run automatically at about 100 snapshots per chunk, capped at 20 chunks, now including the
pagesintegration and Cypress and Playwright runs, which used to run as a single chunk [by @trotzig in #178] - Require a custom integration's
build()to returnestimatedSnapsCount; it doesn't have to be exact [by @trotzig in #178] - Raise the minimum Node version to
^22.18.0 || >=24.0.0, dropping Node 23, and the minimum Storybook version to v9, dropping the v8 addon [by @trotzig in #178] - Require a Happo server with the bulk snap-request endpoint: the fallback to one request per chunk for servers without it is gone [by @trotzig in #178]
Added
- Add a
blockApproval.horizontalOverflowoption, on by default, that blocks approval when a page starts to scroll sideways, whether an existing snapshot now overflows or a new one does; a page that already overflowed, or whose baseline was never measured, doesn't block [by @lencioni in #675]