Skip to content

build(deps-dev): Bump happo-plugin-storybook from 2.10.3 to 3.2.0#45

Open
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot-npm_and_yarn-happo-plugin-storybook-3.2.0
Open

build(deps-dev): Bump happo-plugin-storybook from 2.10.3 to 3.2.0#45
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot-npm_and_yarn-happo-plugin-storybook-3.2.0

Conversation

@dependabot
Copy link

@dependabot dependabot bot commented on behalf of github Mar 6, 2023

Bumps happo-plugin-storybook from 2.10.3 to 3.2.0.

Release notes

Sourced from happo-plugin-storybook's releases.

v3.2.0

New in this version:

Support for Storybook v7

Version 7 of Storybook has been in beta for a while but is soon about to launch. We needed to make some updates to how the happo-plugin-storybook library handled the new environment.

Theming support

This is great for testing dark mode! If you want to include different themes with Happo, you can now add a happo.themes option to a Storybook story. For a CSF, this is what it can look like:

export const ThemedBox = () => (
  <Box>I'm a themed box</Box>
);
ThemedBox.parameters = {
  happo: { themes: ['light', 'dark'] },
};

Happo will split up this story in two separate screenshots. One where the light theme is applied and one where the dark theme is applied. You are responsible for handling the theme switching, so make sure you also add the logic for switching themes to your .storybook/preview.js file. Here's an example that makes use of the storybook-dark-theme library:

import { setThemeSwitcher } from 'happo-plugin-storybook/register';
setThemeSwitcher((theme, channel) => {
return new Promise((resolve) => {
const isDarkMode = theme === 'dark';
// Listen for dark mode to change and resolve.
channel.once(DARK_MODE_EVENT_NAME, resolve);
// Change the theme.
channel.emit(DARK_MODE_EVENT_NAME, isDarkMode);

});
});

The function passed to setThemeSwitcher can be async. Happo will await it before continuing with the screenshot process.

If you want a default config for happo.themes for all stories, you can use global parameters:

// .storybook/preview.js
export const parameters = {
happo: { themes: ['light', 'dark'] },
};

v3.1.0

This minor release adds support for a new Happo panel that you can add to your Storybook UI. It will list all the happo parameters for a Story and you can use it to invoke functions and see other properties. It looks like this:

... (truncated)

Commits
  • 853370f 3.2.0
  • 50976bc Merge pull request #91 from happo/theming-support
  • dff45fd Add support for themes
  • 708c7f5 Merge pull request #90 from happo/storybook-7
  • 06e9572 Exclude constants.js from babel loading
  • c50cfe8 Attempt to unblock SB v5 build
  • 9409755 Move staticDirs config to .storybook/main.js
  • 36994a4 Sewt environment variables correctly in github actions config
  • 30227cc Use framework again in .storybook/main.js
  • 4895d05 Use @​storybook/react@​6.4 in SB v6
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [happo-plugin-storybook](https://github.com/enduire/happo-plugin-storybook) from 2.10.3 to 3.2.0.
- [Release notes](https://github.com/enduire/happo-plugin-storybook/releases)
- [Commits](happo/happo-plugin-storybook@v2.10.3...v3.2.0)

---
updated-dependencies:
- dependency-name: happo-plugin-storybook
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github Mar 6, 2023

Dependabot tried to add @suzubara, @haworku and @ahobson as reviewers to this PR, but received the following error from GitHub:

POST https://api.github.com/repos/samuelraudabaugh/react-uswds/pulls/45/requested_reviewers: 422 - Reviews may only be requested from collaborators. One or more of the users or teams you specified is not a collaborator of the samuelraudabaugh/react-uswds repository. // See: https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request

@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github Mar 6, 2023

The following labels could not be found: type: dependencies, type: automerge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants