Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEVPROD-5139: Combine Storybook config #172

Merged
merged 13 commits into from
Jun 14, 2024

Conversation

sophstad
Copy link
Contributor

@sophstad sophstad commented Jun 11, 2024

DEVPROD-5139

Description

  • Create reusable Storybook addon package
  • Add storybook and snapshots to @evg-ui/lib
  • Add root monorepo storybook that combines all 3 storybooks using composition
  • Implement Dependabot groups so that related dependencies are updated together
  • jackspeak dependency resolution is a workaround for this Storybook bug

Testing

  • Add snapshot and storybook Evergreen tasks to @evg-ui/lib

@sophstad sophstad requested a review from a team June 11, 2024 18:20
@sophstad sophstad marked this pull request as ready for review June 11, 2024 18:20
Copy link
Contributor

@SupaJoon SupaJoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are some other things that could be exported by the shared addons package in the future? Could it be any tooling that's used between Spruce and Parsley storybook or something more specific?

const GlobalStyles = () => (
<Global
styles={css`
${fontStyles}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this fontStyles be deleted because of preview-head.ts?

Copy link
Contributor Author

@sophstad sophstad Jun 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This GlobalStyles component is only used by the application itself, not Storybook, so removing these fontStyles would remove the font styling from the app.

@@ -10,8 +10,7 @@ const resetStyles = css`
}
`;

const globalStyles = css`
${fontStyles}
export const globalStyles = css`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to have 1 globalStyles for spruce and parsley?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes—but I think this is not too pertinent to Storybook actually and can be done as followup work for the shared library. I added a comment to DEVPROD-5148!

@sophstad
Copy link
Contributor Author

sophstad commented Jun 13, 2024

What are some other things that could be exported by the shared addons package in the future? Could it be any tooling that's used between Spruce and Parsley storybook or something more specific?

There is the whole Addon API to leverage, and honestly I think we've barely scratched the surface of what it can do! But also, I think we can export any Storybook-related util functions. (One good candidate is the snapshot script but I think that may be easier once @evg-ui/lib is a little more fleshed out with our test_util functions)

@sophstad sophstad requested a review from SupaJoon June 13, 2024 20:50
@sophstad sophstad merged commit 65c6efb into evergreen-ci:main Jun 14, 2024
5 checks passed
@sophstad sophstad deleted the DEVPROD-5139-vitest branch June 14, 2024 15:20
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.

2 participants