-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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 Docs: Make new code panel opt in #30248
Conversation
There was a problem hiding this 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/docs/src/manager.tsx
Outdated
parameters[PARAM_KEY].codePanel === false | ||
); | ||
}, | ||
disabled: (parameters) => !!parameters?.docs?.codePanel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: This logic is incorrect - it disables the panel when codePanel is true, which is the opposite of what the documentation suggests. Should be !parameters?.docs?.codePanel
to disable when false/undefined.
View your CI Pipeline Execution ↗ for commit 523f051.
☁️ Nx Cloud last updated this comment at |
Package BenchmarksCommit: The following packages have significant changes to their size or dependencies:
|
Before | After | Difference | |
---|---|---|---|
Dependency count | 59 | 59 | 0 |
Self size | 410 KB | 228 KB | 🎉 -183 KB 🎉 |
Dependency size | 13.46 MB | 13.46 MB | 0 B |
Bundle Size Analyzer | Link | Link |
@storybook/addon-essentials
Before | After | Difference | |
---|---|---|---|
Dependency count | 36 | 36 | 0 |
Self size | 17 KB | 12 KB | 🎉 -4 KB 🎉 |
Dependency size | 13.83 MB | 13.83 MB | 🎉 -160 B 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/addon-mdx-gfm
Before | After | Difference | |
---|---|---|---|
Dependency count | 69 | 69 | 0 |
Self size | 4 KB | 3 KB | 🎉 -1 KB 🎉 |
Dependency size | 2.41 MB | 2.41 MB | 0 B |
Bundle Size Analyzer | Link | Link |
97c64f7
to
b451851
Compare
Closes N/A
What I did
There are some open questions about the new code panel. Since we don't have time to address them before 8.5, making the panel opt in instead of opt out for now.
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
Code
panel by defaultdocs.codePanel
parameter totrue
and observe theCode
panel when you restart your storybook.🦋 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>
Greptile Summary
Makes the code panel in Storybook docs addon opt-in rather than opt-out by default, requiring explicit enablement through the
docs.codePanel
parameter.disabled
logic incode/addons/docs/src/manager.tsx
to disable panel by defaultparameters.docs.codePanel = true