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 Test: Show sub test provider toggle state in main testing module #30019

Conversation

ghengeveld
Copy link
Member

@ghengeveld ghengeveld commented Dec 11, 2024

Closes #30009

What I did

Muted the disabled options and adds a (disabled) suffix:

Screenshot 2024-12-11 at 10 55 29

While I was implementing this, I noticed a discrepancy in the color between the muted option and the description text above ("Starting..."). This prompted me to review what color variable was being used. I found a bunch of places where barTextColor was being used while textMutedColor is more appropriate (because it's not in a bar and the intent is muted text) so I've corrected those places as well.

Note that the color difference between defaultText and textMutedColor is pretty minimal, but I've verified these are the exact colors used in Figma.

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 2.91 0%
initSize 133 MB 133 MB -69 B 0.84 0%
diffSize 55.1 MB 55.1 MB -69 B 0.82 0%
buildSize 6.87 MB 6.87 MB -20 B 0.36 0%
buildSbAddonsSize 1.51 MB 1.51 MB 0 B 0.85 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.86 MB 1.86 MB -12 B 0.99 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.57 MB 3.57 MB -12 B 0.95 0%
buildPreviewSize 3.3 MB 3.3 MB -8 B 0.28 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 8.6s 7.6s -964ms -0.21 -12.5%
generateTime 20s 21.5s 1.5s 0.66 7.3%
initTime 13.6s 14.8s 1.1s 0.75 8%
buildTime 9.9s 8.6s -1s -290ms -0.75 -14.8%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 6.1s 4.8s -1s -330ms -0.74 -27.4%
devManagerResponsive 4.3s 3.4s -864ms -1.1 -25%
devManagerHeaderVisible 659ms 567ms -92ms -0.28 -16.2%
devManagerIndexVisible 668ms 615ms -53ms -0.25 -8.6%
devStoryVisibleUncached 1.9s 1.7s -282ms -0.05 -16.5%
devStoryVisible 741ms 609ms -132ms -0.33 -21.7%
devAutodocsVisible 514ms 492ms -22ms -0.67 -4.5%
devMDXVisible 502ms 463ms -39ms -0.97 -8.4%
buildManagerHeaderVisible 661ms 588ms -73ms -0.18 -12.4%
buildManagerIndexVisible 685ms 665ms -20ms -0.3 -3%
buildStoryVisible 532ms 536ms 4ms -0.11 0.7%
buildAutodocsVisible 414ms 447ms 33ms -0.21 7.4%
buildMDXVisible 524ms 414ms -110ms -0.69 -26.6%

Greptile Summary

Here's my summary of the PR changes:

Improves visual feedback for disabled test providers and standardizes muted text colors across the UI components in Storybook's testing module.

  • Added (disabled) suffix and muted text color for disabled test options in code/addons/test/src/components/TestProviderRender.tsx
  • Replaced barTextColor with textMutedColor in multiple components for better semantic meaning and consistency
  • Added new ItemTitle styled component to handle disabled state styling
  • Updated ListItem component to use theme's textMutedColor directly instead of transparentized text
  • Fixed color inconsistency between disabled options and description text in test provider UI

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

7 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link

nx-cloud bot commented Dec 11, 2024

☁️ Nx Cloud Report

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

@ghengeveld ghengeveld merged commit 2873e6c into next Dec 11, 2024
58 of 63 checks passed
@ghengeveld ghengeveld deleted the 30009-show-sub-test-provider-toggle-state-in-main-testing-module branch December 11, 2024 19:08
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.

Show sub-test provider toggle state in main testing module
2 participants