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

normalize storybook fixtures #6316

Merged
merged 58 commits into from
Aug 25, 2022

Conversation

radium-v
Copy link
Collaborator

Pull Request

📖 Description

Normalizes all storybook stories by updating types, implementing a renderComponent helper function, and adding conventions for the optional, story-specific storyContent and storyItems args.

👩‍💻 Reviewer Notes

I moved any types and enum-style consts to the separate *options.ts file for each component, which helps isolate those simple values and types for both Storybook and Playwright usage. This will be more important on the Playwright side, since PW's TypeScript handling runs into errors when trying to load any component modules in its node source.

📑 Test Plan

All tests should pass as expected.

✅ Checklist

General

  • I have included a change request file using $ yarn change
  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Component-specific

⏭ Next Steps

This PR is split from the work in #6189.

@radium-v radium-v self-assigned this Aug 25, 2022
@radium-v radium-v changed the title Users/jokreitl/normalize storybook fixtures normalize storybook fixtures Aug 25, 2022
@radium-v radium-v force-pushed the users/jokreitl/normalize-storybook-fixtures branch from 28b74de to 226f227 Compare August 25, 2022 00:55
@@ -1,6 +1,13 @@
{
"extends": ["@microsoft/eslint-config-fast-dna", "prettier"],
"rules": {
"import/extensions": [
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this to enforce extensions in TypeScript src files? If so I don't think it's necessary. ModuleResolution Node16 will throw compile errors if extensions don't exist.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was mistakenly added to this PR - it was needed during the playwright test file conversions.

Copy link
Member

@chrisdholt chrisdholt left a comment

Choose a reason for hiding this comment

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

Lotta work here - thank you @radium-v!

Copy link
Contributor

@EisenbergEffect EisenbergEffect left a comment

Choose a reason for hiding this comment

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

This is a massive accomplishment. Thanks for putting this together @radium-v. My review was pretty high-level so if there are errors in the details, I probably didn't catch them. However, from file to file things look consistent and an improvement from before. Very glad to see this coming together.

@radium-v radium-v force-pushed the users/jokreitl/normalize-storybook-fixtures branch 3 times, most recently from 146fbc7 to 04b3814 Compare August 25, 2022 21:39
@radium-v radium-v force-pushed the users/jokreitl/normalize-storybook-fixtures branch from 04b3814 to aa20826 Compare August 25, 2022 21:52
@radium-v radium-v merged commit 6fae6f0 into master Aug 25, 2022
@radium-v radium-v deleted the users/jokreitl/normalize-storybook-fixtures branch August 25, 2022 22:43
janechu pushed a commit that referenced this pull request Jun 10, 2024
* add storybook types and renderComponent helper

* add ES2017.Object lib to tsconfig

* update eslintrc

* add hidden debug story

* move accordion types to options module

* move anchor types to options module

* move anchored-region types to options module

* move button types to options module

* move horizontal-scroll types to options module

* move picker types to options module

* move slider types to options module

* normalize accordion stories

* normalize accordion-item stories

* normalize anchor stories

* normalize anchored-region stories

* normalize avatar stories

* normalize badge stories

* normalize breadcrumb stories

* normalize breadcrumb-item stories

* normalize button stories

* normalize calendar stories

* normalize card stories

* normalize checkbox stories

* normalize combobox stories

* normalize data-grid, data-grid-row, and data-grid-cell stories

* normalize dialog stories

* normalize disclosure stories

* normalize divider stories

* normalize flipper stories

* normalize horizontal-scroll stories

* normalize listbox stories

* normalize listbox-option stories

* normalize menu stories

* normalize menu-item stories

* normalize number-field stories

* normalize picker stories

* normalize progress stories

* normalize progress and progress-ring stories

* normalize radio stories

* normalize radio-group stories

* normalize search stories

* normalize select stories

* normalize skeleton stories

* normalize slider stories

* normalize slider-label stories

* normalize switch stories

* normalize tab stories

* normalize tab-panel stories

* normalize tabs stories

* normalize text-area stories

* normalize text-field stories

* normalize toolbar stories

* normalize tooltip stories

* normalize tree-item stories

* normalize tree-view stories

* update api-report and READMEs

* Change files

* patch flipper
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.

4 participants