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

Core / Addon Test: Add config UI to Testing Module #29708

Merged
merged 20 commits into from
Nov 28, 2024

Conversation

ghengeveld
Copy link
Member

@ghengeveld ghengeveld commented Nov 26, 2024

What I did

Added a settings/config view to the Testing Module for the Test addon, which allows toggling coverage and a11y tests:

Screen.Recording.2024-11-26.at.09.38.48.mov

Whenever config is updated, the testing module briefly glows green.

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 -1.36 0%
initSize 143 MB 143 MB 643 B -1.36 0%
diffSize 65.2 MB 65.2 MB 643 B 1.31 0%
buildSize 6.83 MB 6.83 MB 421 B 1.56 0%
buildSbAddonsSize 1.51 MB 1.51 MB 0 B 1.47 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.86 MB 1.86 MB 293 B 1.17 0%
buildSbPreviewSize 271 kB 271 kB 0 B 1.47 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.84 MB 3.84 MB 293 B 1.34 0%
buildPreviewSize 3 MB 3 MB 128 B 24.57 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.7s 7.8s 1.1s -0.96 14.3%
generateTime 20s 23.1s 3.1s 0.32 13.5%
initTime 13.4s 18s 4.6s 0.58 25.5%
buildTime 9.4s 8.9s -515ms 0.09 -5.8%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 5.8s 6.4s 591ms 0.35 9.2%
devManagerResponsive 3.8s 3.7s -22ms 0.07 -0.6%
devManagerHeaderVisible 493ms 722ms 229ms 0.51 31.7%
devManagerIndexVisible 569ms 755ms 186ms 0.31 24.6%
devStoryVisibleUncached 767ms 1s 289ms -0.08 27.4%
devStoryVisible 568ms 754ms 186ms 0.36 24.7%
devAutodocsVisible 443ms 554ms 111ms 0.03 20%
devMDXVisible 477ms 608ms 131ms 0.13 21.5%
buildManagerHeaderVisible 462ms 672ms 210ms 0.2 31.3%
buildManagerIndexVisible 475ms 695ms 220ms 0.2 31.7%
buildStoryVisible 464ms 670ms 206ms 0.2 30.7%
buildAutodocsVisible 396ms 561ms 165ms 0.28 29.4%
buildMDXVisible 417ms 489ms 72ms -0.19 14.7%

Greptile Summary

Added settings UI to the Testing Module in Storybook's test addon, enabling users to toggle coverage and accessibility testing options with visual feedback for configuration changes.

  • Added TestProviderRender component with settings panel UI and state management in /code/addons/test/src/components/TestProviderRender.tsx
  • Added TestStatusIcon component in /code/addons/test/src/components/TestStatusIcon.tsx for visual status indicators with percentage display
  • Modified ListItem component in /code/core/src/components/components/tooltip/ListItem.tsx to support label elements for settings UI
  • Added config change animation feedback in /code/core/src/manager/components/sidebar/TestingModule.tsx with proper cleanup
  • Fixed potential memory leak by cleaning up event listeners and timeouts in TestingModule component

💡 (2/5) Greptile learns from your feedback when you react with 👍/👎!

@ghengeveld ghengeveld changed the base branch from next to norbert/testmodule-options November 26, 2024 08:43
@ghengeveld ghengeveld changed the title Core / Addon Test: Add settings view to Testing Module Core / Addon Test: Add config UI to Testing Module Nov 26, 2024
Copy link

nx-cloud bot commented Nov 26, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit d77b321. 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 Nov 26, 2024

Package Benchmarks

Commit: d77b321, ran on 27 November 2024 at 13:40:05 UTC

No significant changes detected, all good. 👏

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.

19 file(s) reviewed, 9 comment(s)
Edit PR Review Bot Settings | Greptile

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.

9 file(s) reviewed, 5 comment(s)
Edit PR Review Bot Settings | Greptile

Base automatically changed from norbert/testmodule-options to next November 26, 2024 13:04
@ghengeveld ghengeveld merged commit 4d08f6d into next Nov 28, 2024
60 checks passed
@ghengeveld ghengeveld deleted the testing-module-settings branch November 28, 2024 09:16
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.

3 participants