question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update Storybook module settings stories to use createLegacySettingsWrapper

See original GitHub issue

Bug Description

Currently our Storybook stories for module settings each use the same Settings wrapper component which is used just for rendering in Storybook. This is defined in the stories file for multiple modules’ settings stories, e.g.:

https://github.com/google/site-kit-wp/blob/33a649d3b20fbcf9f5d9f04d6ff53640825a8e41/stories/module-analytics-settings.stories.js#L56-L103

In #1715 we introduced the createLegacySettingsWrapper utility for reducing this boilerplate needed for each module’s settings stories.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • Settings wrapper components defined in stories/module-*-settings.stories.js files should be removed
  • Stories in stories/module-*-settings.stories.js should be refactored to use createLegacySettingsWrapper

See Tag Manager for example usage: https://github.com/google/site-kit-wp/blob/20f826af64092da7633d94ead7d23a75667762a7/stories/modules-tagmanager-settings.stories.js#L35

Implementation Brief

  • Update stories/module-*-settings.stories.js (except tagmanager as it is already done) to use the new utility instead of the inline Settings component definition

QA Brief

  • N/A

Changelog entry

  • N/A

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
felixarntzcommented, Jul 17, 2020

IB ✅

1reaction
umuurcommented, Jul 17, 2020

Hello, can I take this issue as a first timer?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure Storybook
The main.js configuration file is a preset and, as such, has a powerful interface, but the key fields within it are: stories ......
Read more >
storybook/MIGRATION.md at next - GitHub
Storybook is a frontend workshop for building UI components and pages in isolation. Made for UI development, testing, and documentation.
Read more >
Configuring Storybook: 6 Tips You Can't Miss - Medium
webpackFinal - custom webpack configuration. 4. babel - custom babel configuration. module.exports = {// The location of your stories stories: ...
Read more >
Visual Testing with Storybook | Gatsby
Manual configuration. TypeScript Support; Writing stories; Additional resources. Note: Make sure that you use Storybook version >=6.3.0 before following the ...
Read more >
Storybook - no stories showing up in typescript project with ...
It seems like the babel plugin transform-es2015-modules-amd doesn't fit right with storybook since sb still uses your babel configuration.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found