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

Addon A11y: Run the a11y automigration on postInstall #30004

Merged
merged 8 commits into from
Dec 11, 2024

Conversation

kasperpeulen
Copy link
Contributor

@kasperpeulen kasperpeulen commented Dec 10, 2024

What I did

Run the a11y automigration on postInstall.

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

  1. Update a project to the canary.
  2. Run npx storybook add @storybook/addon-a11y
  3. See the vitest.setup.ts file being changed when you accept the automigration.
image

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 pull request has been released as version 0.0.0-pr-30004-sha-3fbd9480. Try it out in a new sandbox by running npx [email protected] sandbox or in an existing project with npx [email protected] upgrade.

More information
Published version 0.0.0-pr-30004-sha-3fbd9480
Triggered by @kasperpeulen
Repository storybookjs/storybook
Branch kasper/a11y-postinstall
Commit 3fbd9480
Datetime Wed Dec 11 11:39:53 UTC 2024 (1733917193)
Workflow run 12275602191

To request a new release of this pull request, mention the @storybookjs/core team.

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

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.7 MB 77.7 MB 0 B 1.36 0%
initSize 133 MB 133 MB 5 B 0.45 0%
diffSize 55.1 MB 55.1 MB 5 B 0.42 0%
buildSize 6.87 MB 6.87 MB 0 B 0.54 0%
buildSbAddonsSize 1.51 MB 1.51 MB 0 B 0.45 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.86 MB 1.86 MB 0 B 0.57 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.54 0%
buildPreviewSize 3.3 MB 3.3 MB 0 B 0.53 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 6.4s 8.2s 1.8s -0.16 21.8%
generateTime 18.7s 22.7s 3.9s 0.86 17.6%
initTime 12.1s 14.8s 2.6s 0.39 17.8%
buildTime 10.5s 8.2s -2s -383ms -1.75 🔰-29%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 5.2s 4.8s -400ms -0.91 -8.2%
devManagerResponsive 3.6s 3.4s -188ms -1.21 -5.4%
devManagerHeaderVisible 540ms 491ms -49ms -1.36 🔰-10%
devManagerIndexVisible 572ms 570ms -2ms -0.84 -0.4%
devStoryVisibleUncached 1.8s 1.7s -117ms -0.28 -6.7%
devStoryVisible 570ms 570ms 0ms -0.86 0%
devAutodocsVisible 492ms 544ms 52ms -0.28 9.6%
devMDXVisible 504ms 322ms -182ms -3.3 🔰-56.5%
buildManagerHeaderVisible 547ms 510ms -37ms -1.06 -7.3%
buildManagerIndexVisible 654ms 599ms -55ms -1.05 -9.2%
buildStoryVisible 506ms 478ms -28ms -0.91 -5.9%
buildAutodocsVisible 426ms 387ms -39ms -1.27 🔰-10.1%
buildMDXVisible 420ms 419ms -1ms -0.79 -0.2%

Greptile Summary

Added a postinstall script to @storybook/addon-a11y that runs accessibility automigration during installation, but the implementation has critical issues that need to be addressed.

  • Missing error handling and exit code checks in code/addons/a11y/src/postinstall.ts
  • Incorrect migration ID addonA11yAddonTest used in automigration command
  • Promise never rejects in postinstall script, potentially masking failures
  • Added proper postinstall export configuration in package.json but supporting problematic implementation
  • Added postinstall script to nodeEntries in bundler configuration

💡 (3/5) Reply to the bot's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!

Copy link

nx-cloud bot commented Dec 10, 2024

☁️ Nx Cloud Report

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

@storybook-pr-benchmarking
Copy link

storybook-pr-benchmarking bot commented Dec 10, 2024

Package Benchmarks

Commit: b83343b, ran on 11 December 2024 at 13:12:37 UTC

The following packages have significant changes to their size or dependencies:

@storybook/addon-a11y

Before After Difference
Dependency count 59 59 0
Self size 45 KB 411 KB 🚨 +366 KB 🚨
Dependency size 13.46 MB 13.46 MB 0 B
Bundle Size Analyzer Link Link

@kasperpeulen kasperpeulen marked this pull request as ready for review December 11, 2024 09:39
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.

2 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

code/addons/a11y/src/postinstall.ts Outdated Show resolved Hide resolved
code/addons/a11y/src/postinstall.ts Outdated Show resolved Hide resolved
code/addons/a11y/src/postinstall.ts Outdated Show resolved Hide resolved
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 | Greptile

@valentinpalkovic valentinpalkovic changed the title A11y: Run the a11y automigration on postInstall Addon A11y: Run the a11y automigration on postInstall Dec 11, 2024
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.

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

code/addons/a11y/src/postinstall.ts Outdated Show resolved Hide resolved
@kasperpeulen kasperpeulen merged commit 0f514e2 into next Dec 11, 2024
58 checks passed
@kasperpeulen kasperpeulen deleted the kasper/a11y-postinstall branch December 11, 2024 14:22
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