storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.68k stars 9.32k forks source link

Addon Test: Only render the TestingModule component in development mode #29501

Closed yannbf closed 2 weeks ago

yannbf commented 2 weeks ago

Closes #

What I did

This PR fixes a situation like so: image

So the testing module is only shown in local development, never when serving a Storybook in prod mode or when uploading to places like Chromatic

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

Checklist for Maintainers

🦋 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 78 MB 78 MB 0 B 2.38 0%
initSize 143 MB 143 MB 168 B 2.39 0%
diffSize 65.1 MB 65.1 MB 168 B 0.86 0%
buildSize 6.87 MB 6.87 MB 444 B 0.28 0%
buildSbAddonsSize 1.51 MB 1.51 MB 0 B 1 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.9 MB 1.9 MB 444 B 0.28 0%
buildSbPreviewSize 271 kB 271 kB 0 B - 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.88 MB 3.88 MB 444 B 0.28 0%
buildPreviewSize 3 MB 3 MB 0 B 3 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 22.7s 7.4s -15s -361ms -1.49 🔰-206.7%
generateTime 19.8s 22s 2.1s -0.32 9.6%
initTime 14.7s 14.8s 62ms -0.73 0.4%
buildTime 10.4s 9.7s -639ms 0.59 -6.5%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 7.3s 7.1s -155ms 1.36 -2.2%
devManagerResponsive 4.6s 4.4s -270ms 1.1 -6.1%
devManagerHeaderVisible 847ms 698ms -149ms 0.46 -21.3%
devManagerIndexVisible 883ms 773ms -110ms 0.55 -14.2%
devStoryVisibleUncached 1.5s 1.5s -13ms 1.17 -0.9%
devStoryVisible 881ms 770ms -111ms 0.62 -14.4%
devAutodocsVisible 845ms 791ms -54ms 2.14 🔰-6.8%
devMDXVisible 734ms 673ms -61ms 1.18 -9.1%
buildManagerHeaderVisible 876ms 858ms -18ms 2.27 -2.1%
buildManagerIndexVisible 920ms 877ms -43ms 2.19 -4.9%
buildStoryVisible 874ms 857ms -17ms 2.26 -2%
buildAutodocsVisible 668ms 538ms -130ms 0.25 -24.2%
buildMDXVisible 740ms 528ms -212ms 0.21 -40.2%

Greptile Summary

Added conditional rendering of the TestingModule component in Storybook's sidebar to only show during development mode.

nx-cloud[bot] commented 2 weeks ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 54c871270feec80262fda3c69ba9b9378630b427. 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 - [`nx run-many -t build --parallel=3`](https://cloud.nx.app/runs/n1oUYDbtit?utm_source=pull-request&utm_medium=comment)

Sent with 💌 from NxCloud.