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

Onboarding: Fix code snippet when story name differs from export name #28649

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

ghengeveld
Copy link
Member

@ghengeveld ghengeveld commented Jul 18, 2024

Closes #28626

What I did

Rather than using the story name to lookup the source code snippet for a newly created story, this uses the export name.

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.5 MB 76.5 MB 0 B 1.21 0%
initSize 198 MB 198 MB 220 B -0.46 0%
diffSize 121 MB 121 MB 220 B -0.47 0%
buildSize 7.59 MB 7.59 MB 13 B 3.09 0%
buildSbAddonsSize 1.63 MB 1.63 MB 13 B 3.25 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 2.3 MB 2.3 MB 0 B 2 0%
buildSbPreviewSize 349 kB 349 kB 0 B 3 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 4.47 MB 4.47 MB 13 B 3.2 0%
buildPreviewSize 3.12 MB 3.12 MB 0 B 2.38 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 9.1s 24.4s 15.2s 1.69 🔺62.5%
generateTime 21.8s 23.1s 1.3s 0.3 5.9%
initTime 23.5s 22.6s -914ms -0.43 -4%
buildTime 14.6s 14.2s -395ms -0.21 -2.8%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 8s 7.6s -379ms -1.13 -4.9%
devManagerResponsive 5.5s 5.1s -405ms -1.34 🔰-7.8%
devManagerHeaderVisible 874ms 803ms -71ms 0.17 -8.8%
devManagerIndexVisible 898ms 845ms -53ms 0.43 -6.3%
devStoryVisibleUncached 1.1s 1.3s 180ms 0.39 13.6%
devStoryVisible 914ms 869ms -45ms 0.43 -5.2%
devAutodocsVisible 809ms 763ms -46ms 0.44 -6%
devMDXVisible 706ms 665ms -41ms -1.38 🔰-6.2%
buildManagerHeaderVisible 1.1s 783ms -336ms -0.07 -42.9%
buildManagerIndexVisible 1.1s 785ms -357ms -0.09 -45.5%
buildStoryVisible 1.1s 825ms -373ms -0.19 -45.2%
buildAutodocsVisible 1s 737ms -341ms 0.03 -46.3%
buildMDXVisible 786ms 704ms -82ms 0.26 -11.6%

Copy link

nx-cloud bot commented Jul 18, 2024

☁️ Nx Cloud Report

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

@shilman shilman changed the title Addon Onboarding: Fix code snippet for stories with a name that deviates from their export name Onboarding: Fix code snippet when story name differs from export name Jul 19, 2024
@shilman shilman merged commit 2f38895 into next Jul 19, 2024
57 of 58 checks passed
@shilman shilman deleted the fix-new-story-snippet branch July 19, 2024 10:39
@github-actions github-actions bot mentioned this pull request Jul 19, 2024
12 tasks
@shilman shilman added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Jul 19, 2024
shilman added a commit that referenced this pull request Jul 19, 2024
Onboarding: Fix code snippet when story name differs from export name
(cherry picked from commit 2f38895)
@shilman shilman mentioned this pull request Jul 19, 2024
13 tasks
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: onboarding bug ci:normal patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Onboarding fails when PascalCase story is created
3 participants