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: Fix default annotations for portable stories #28825

Merged
merged 4 commits into from
Aug 7, 2024

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Aug 7, 2024

Closes #

What I did

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/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 76.3 MB 76.3 MB 20 B -0.02 0%
initSize 171 MB 171 MB 20 B -1.73 0%
diffSize 94.6 MB 94.6 MB 0 B -1.73 0%
buildSize 7.43 MB 7.43 MB 0 B -1.73 0%
buildSbAddonsSize 1.61 MB 1.61 MB 0 B -1.66 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 2.3 MB 2.3 MB 0 B -1.38 0%
buildSbPreviewSize 350 kB 350 kB 0 B 0.72 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 4.46 MB 4.46 MB 0 B -1.59 0%
buildPreviewSize 2.97 MB 2.97 MB 0 B -1.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 17.3s 8s -9s -306ms -0.62 -115.7%
generateTime 23.7s 25.5s 1.8s 0.74 7.1%
initTime 19.7s 22.5s 2.7s -0.26 12.4%
buildTime 12.9s 11.8s -1s -136ms -2.77 🔰-9.6%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 8s 8.2s 192ms -0.52 2.3%
devManagerResponsive 5.2s 4.7s -428ms -1.57 🔰-8.9%
devManagerHeaderVisible 821ms 831ms 10ms -0.17 1.2%
devManagerIndexVisible 857ms 857ms 0ms -0.25 0%
devStoryVisibleUncached 1.4s 1.3s -80ms -0.1 -5.9%
devStoryVisible 877ms 879ms 2ms -0.28 0.2%
devAutodocsVisible 759ms 785ms 26ms -0.02 3.3%
devMDXVisible 728ms 799ms 71ms -0.1 8.9%
buildManagerHeaderVisible 733ms 861ms 128ms 0.7 14.9%
buildManagerIndexVisible 741ms 863ms 122ms 0.67 14.1%
buildStoryVisible 788ms 914ms 126ms 0.71 13.8%
buildAutodocsVisible 692ms 717ms 25ms -0.06 3.5%
buildMDXVisible 786ms 724ms -62ms -0.2 -8.6%

Greptile Summary

The pull request introduces improvements to the handling of default project annotations for Next.js setups and enhances the Vitest setup for Storybook sandboxes.

  • code/frameworks/nextjs/src/portable-stories.ts:

    • Introduced setDefaultProjectAnnotations function.
    • Utilized setDefaultProjectAnnotations in setProjectAnnotations and composeStory.
    • Defined INTERNAL_DEFAULT_PROJECT_ANNOTATIONS to include React, RSC, and Next.js annotations.
  • scripts/tasks/sandbox-parts.ts:

    • Added storybookScript option to storybookTest plugin configuration in setupVitest.
    • Ensured Storybook runs in CI mode during Vitest tests.

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

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

nx-cloud bot commented Aug 7, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 24e8a73. 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


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@yannbf yannbf merged commit e4320b1 into vitest-integration Aug 7, 2024
3 checks passed
@yannbf yannbf deleted the yann/fix-nextjs-issues branch August 7, 2024 10:55
@yannbf yannbf self-assigned this Aug 15, 2024
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.

1 participant