Release notes

happo for npm release notes

The happo npm package: the CLI and its Storybook, Cypress, Playwright, and Vitest integrations.

2.8.0

  • Generate LCS diff image in browser instead of during Happo run.
  • Change default view back to diffs.

2.7.7

  • Improve screenshotting of components with sub-pixel dimensions.

2.7.6

Fixes the issue where all snapshots would start at the top left of the screen.

2.7.5

After making the change to include all DOM nodes in the snapshot (instead of using the returned node) led to it being a lot harder to control the width of the snapshot. If you use React, you probably use ReactDOM.render to render the happo example into the DOM. This usually involves creating an anonymous div that you append to the <body>. Without some clever css styling in order to make this anonymous div the right size, you'll end up with full-width snapshots. To fix that, we've added a getRootNodes function that you can use to control what nodes are used to compute the bounding rectangle.

Here's an example for React:

happo.getRootNodes = function () {
  return document.querySelectorAll('[data-reactroot]');
};

You can return a NodeList or an Array from this function.

2.7.4

Make scrollbar prevention less aggressive by taking the overflow property into account.

2.7.3

  • Add bind configuration option

2.7.1

  • Avoid calling cleanOutElement on non-elements.

2.7.0

  • Include all nodes in screenshots.
  • Remove snapshotEntireScreen option.
  • Remove need for examples to return reference to element.
  • Replace hover caption with title attribute.

2.6.0

  • Disable nested scrollbars before taking screenshots.

2.5.2

  • Fix broken image uploads.

Need help?