-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Core: Support container queries in addon panels #23261
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
Merged
ghengeveld
merged 4 commits into
storybookjs:next
from
neil-morrison44:nm/add_container_query_to_tab_content
Jun 25, 2025
Merged
Core: Support container queries in addon panels #23261
ghengeveld
merged 4 commits into
storybookjs:next
from
neil-morrison44:nm/add_container_query_to_tab_content
Jun 25, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Content in tabs
ghengeveld
approved these changes
Jun 24, 2025
|
View your CI Pipeline Execution ↗ for commit 9452eba.
☁️ 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 | 51 | 49 | 🎉 -2 🎉 |
| Self size | 31.72 MB | 31.87 MB | 🚨 +149 KB 🚨 |
| Dependency size | 17.43 MB | 17.41 MB | 🎉 -22 KB 🎉 |
| Bundle Size Analyzer | Link | Link |
sb
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 52 | 50 | 🎉 -2 🎉 |
| Self size | 1 KB | 1 KB | 0 B |
| Dependency size | 49.15 MB | 49.27 MB | 🚨 +126 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/cli
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 218 | 216 | 🎉 -2 🎉 |
| Self size | 582 KB | 582 KB | 0 B |
| Dependency size | 94.80 MB | 94.89 MB | 🚨 +94 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/codemod
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 187 | 185 | 🎉 -2 🎉 |
| Self size | 31 KB | 31 KB | 0 B |
| Dependency size | 78.90 MB | 79.03 MB | 🚨 +126 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
create-storybook
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 1 | 1 | 0 |
| Self size | 12.50 MB | 12.47 MB | 🎉 -32 KB 🎉 |
| Dependency size | 98 KB | 98 KB | 0 B |
| Bundle Size Analyzer | Link | Link |
71 tasks
This was referenced Aug 18, 2025
This was referenced Aug 18, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #23227
What I did
I've added a named
containerto the tab content so things which appear within tabs (e.g. addon panels) can size themselves based on that size & do media queries.Container queries has decent coverage now: https://caniuse.com/css-container-queries & browsers that don't understand will skip it.
How to test
Since it's CSS & at the border of the Addons you'll probably need to check that addons can do things like
and
(I've checked by adding them into a running storybook via dev tools and they work)
Before and after of one of my addons:
Before (
height: 100%;):After (
height: 100cqh;):Checklist
MIGRATION.MD
Maintainers
make sure to add the
ci:mergedorci:dailyGH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]