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

Automigration: Improve addon-a11y-addon-test #30127

Merged
merged 2 commits into from
Dec 23, 2024

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Dec 23, 2024

Closes #

What I did

I have improved the addon-a11y-addon-test automigration to only apply it for supported frameworks and renderers.

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 pull request has been released as version 0.0.0-pr-30127-sha-cb69dbf6. 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-30127-sha-cb69dbf6
Triggered by @valentinpalkovic
Repository storybookjs/storybook
Branch valentin/improve-a11y-addon-automigration
Commit cb69dbf6
Datetime Mon Dec 23 14:32:34 UTC 2024 (1734964354)
Workflow run 12468414303

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=30127

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.8 MB 77.8 MB 0 B 1.27 0%
initSize 143 MB 143 MB 0 B 2.16 0%
diffSize 65.6 MB 65.6 MB 0 B 2.16 0%
buildSize 7.19 MB 7.19 MB 0 B -1.47 0%
buildSbAddonsSize 1.85 MB 1.85 MB 0 B -1.17 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.87 MB 1.87 MB 0 B 0.65 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.92 MB 3.92 MB 0 B -1.21 0%
buildPreviewSize 3.28 MB 3.28 MB 0 B -1.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 7.1s 25.5s 18.3s 1.36 🔺72%
generateTime 19s 23.5s 4.5s 1.86 🔺19.3%
initTime 13.8s 17.2s 3.4s 2.62 🔺19.7%
buildTime 8.8s 9s 185ms -0.45 2%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 4.7s 5.3s 572ms -0.07 10.7%
devManagerResponsive 3.6s 3.9s 333ms -0.1 8.4%
devManagerHeaderVisible 607ms 794ms 187ms 0.88 23.6%
devManagerIndexVisible 636ms 834ms 198ms 0.88 23.7%
devStoryVisibleUncached 1.9s 2s 85ms 0.2 4.2%
devStoryVisible 637ms 835ms 198ms 0.89 23.7%
devAutodocsVisible 529ms 665ms 136ms 0.58 20.5%
devMDXVisible 569ms 725ms 156ms 0.9 21.5%
buildManagerHeaderVisible 619ms 608ms -11ms -0.35 -1.8%
buildManagerIndexVisible 726ms 741ms 15ms -0.13 2%
buildStoryVisible 605ms 594ms -11ms -0.26 -1.9%
buildAutodocsVisible 422ms 613ms 191ms 0.83 31.2%
buildMDXVisible 529ms 557ms 28ms 0.54 5%

Greptile Summary

Based on the provided files and changes, I'll create a concise summary of this PR:

Improved the addon-a11y-addon-test automigration to only apply to explicitly supported frameworks and renderers, adding framework compatibility validation.

  • Added SUPPORTED_FRAMEWORKS and SUPPORTED_RENDERERS constants in code/addons/test/src/constants.ts to define compatibility
  • Updated automigration logic in addon-a11y-addon-test.ts to validate framework/renderer support before migration
  • Added framework compatibility tests in addon-a11y-addon-test.test.ts to verify unsupported frameworks are rejected
  • Added noFallthroughCasesInSwitch to TypeScript config for better switch statement safety
  • Enhanced postinstall script with improved framework detection and prerequisite checks

@valentinpalkovic valentinpalkovic force-pushed the valentin/improve-a11y-addon-automigration branch from 2eaf43a to 584d095 Compare December 23, 2024 13:59
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.

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

Copy link

nx-cloud bot commented Dec 23, 2024

View your CI Pipeline Execution ↗ for commit cb69dbf.

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 1m 37s View ↗

☁️ Nx Cloud last updated this comment at 2024-12-23 14:32:44 UTC

@storybook-pr-benchmarking
Copy link

storybook-pr-benchmarking bot commented Dec 23, 2024

Package Benchmarks

Commit: cb69dbf, ran on 23 December 2024 at 14:38:31 UTC

No significant changes detected, all good. 👏

@yannbf yannbf merged commit 3258fc7 into next Dec 23, 2024
61 checks passed
@yannbf yannbf deleted the valentin/improve-a11y-addon-automigration branch December 23, 2024 14:55
@github-actions github-actions bot mentioned this pull request Dec 23, 2024
8 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