-
-
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
UI: Fix controls and parameters on tag-filtered stories #30038
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.
9 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile
}, | ||
// FIXME: is there a bug where filtered stories get added back in on updateStory??? |
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 FIXME comment identifies a real issue - filtered stories could get re-added during updates. Consider adding a check to prevent this.
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 6dc2790. 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 targetSent with 💌 from NxCloud. |
85af220
to
bea7aec
Compare
Package BenchmarksCommit: The following packages have significant changes to their size or dependencies:
|
Before | After | Difference | |
---|---|---|---|
Dependency count | 59 | 59 | 0 |
Self size | 411 KB | 45 KB | 🎉 -366 KB 🎉 |
Dependency size | 13.46 MB | 13.46 MB | 0 B |
Bundle Size Analyzer | Link | Link |
@storybook/addon-onboarding
Before | After | Difference | |
---|---|---|---|
Dependency count | 0 | 2 | 🚨 +2 🚨 |
Self size | 235 KB | 216 KB | 🎉 -19 KB 🎉 |
Dependency size | 670 B | 235 KB | 🚨 +235 KB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/experimental-nextjs-vite
Before | After | Difference | |
---|---|---|---|
Dependency count | 153 | 87 | 🎉 -66 🎉 |
Self size | 231 KB | 231 KB | 🎉 -16 B 🎉 |
Dependency size | 44.67 MB | 31.57 MB | 🎉 -13.10 MB 🎉 |
Bundle Size Analyzer | Link | Link |
bea7aec
to
56f5220
Compare
56f5220
to
6dc2790
Compare
Closes #29827
What I did
Refactor the manager to include a full stories hash and a filtered stories hash. Show the filtered hash in the sidebar but use the full stories hash for storing parameters etc.
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
🦋 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
This PR refactors Storybook's manager to maintain both full and filtered story indexes, ensuring Controls panel functionality remains intact when stories are filtered by tags in the sidebar.
filteredIndex
field toAPI_LoadedRefData
interface incode/core/src/types/modules/api.ts
setIndex
incode/core/src/manager-api/modules/stories.ts
to maintain both filtered and unfiltered story hashesfilteredIndex
for display while preserving full story data for Controlscode/core/src/manager-api/tests/stories.test.ts
for filtered index functionalitycode/core/src/manager-api/modules/refs.ts