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

Nextjs-Vite: Fix docgen types in main config #30042

Merged
merged 2 commits into from
Dec 13, 2024
Merged

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Dec 12, 2024

Closes #

What I did

This PR is a followup to #29824 to add types in StorybookConfig for typescript and docgen options

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.7 MB 77.7 MB 0 B 0.9 0%
initSize 133 MB 133 MB -775 B 0.91 0%
diffSize 55.3 MB 55.3 MB -775 B 0.91 0%
buildSize 6.87 MB 6.87 MB 0 B -0.32 0%
buildSbAddonsSize 1.51 MB 1.51 MB 0 B -0.65 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.86 MB 1.86 MB 0 B 2.37 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.57 MB 3.57 MB 0 B -0.31 0%
buildPreviewSize 3.3 MB 3.3 MB 0 B -0.73 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 7.5s 6.9s -632ms -1.01 -9.1%
generateTime 21.6s 19.5s -2s -84ms -0.61 -10.7%
initTime 15.2s 12.4s -2s -746ms -0.9 -22%
buildTime 9.3s 9.9s 575ms 1.07 5.8%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 5.8s 4.9s -886ms -0.33 -18%
devManagerResponsive 4.3s 3.7s -633ms -0.23 -17%
devManagerHeaderVisible 717ms 533ms -184ms -0.5 -34.5%
devManagerIndexVisible 803ms 601ms -202ms -0.45 -33.6%
devStoryVisibleUncached 2.2s 1.8s -405ms 0.02 -21.6%
devStoryVisible 801ms 562ms -239ms -0.78 -42.5%
devAutodocsVisible 605ms 463ms -142ms -0.65 -30.7%
devMDXVisible 667ms 466ms -201ms -0.61 -43.1%
buildManagerHeaderVisible 583ms 717ms 134ms 1.11 18.7%
buildManagerIndexVisible 694ms 843ms 149ms 1.31 🔺17.7%
buildStoryVisible 539ms 656ms 117ms 1.1 17.8%
buildAutodocsVisible 430ms 575ms 145ms 1.04 25.2%
buildMDXVisible 435ms 581ms 146ms 1.49 🔺25.1%

Greptile Summary

Based on the provided information, I'll create a concise summary of the key changes in this pull request:

Adds TypeScript docgen configuration support to the experimental Next.js Vite framework by extending the StorybookConfig type system.

  • Added TypescriptOptions type in experimental-nextjs-vite/src/types.ts with reactDocgen and reactDocgenTypescriptOptions fields
  • Added import for docgenTypescript plugin type from @joshwooding/vite-plugin-react-docgen-typescript
  • Extended StorybookConfig type to include optional typescript configuration for docgen settings
  • Configured type definitions to support both react-docgen and react-docgen-typescript options

The changes enable proper TypeScript type checking when configuring documentation generation options in the Storybook main configuration file.

Copy link

nx-cloud bot commented Dec 12, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit bb323de. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


🟥 Failed Commands
nx run-many -t build --parallel=3

Sent with 💌 from NxCloud.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

LGTM

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@shilman shilman changed the title Experimental Nextjs: Add docgen types to main config Nextjs-Vite: Fix docgen types in main config Dec 12, 2024
@yannbf yannbf force-pushed the yann/next-vite-docgen-types branch from 40a006a to bb323de Compare December 13, 2024 10:21
@yannbf yannbf merged commit 27eb245 into next Dec 13, 2024
57 of 58 checks passed
@yannbf yannbf deleted the yann/next-vite-docgen-types branch December 13, 2024 11:27
@github-actions github-actions bot mentioned this pull request Dec 13, 2024
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants