Tags: Remove undocumented x-only tags#32360
Conversation
|
|
||
| During development of Storybook [Tags](https://storybook.js.org/docs/writing-stories/tags), we created `dev-only`, `docs-only`, and `test-only` built-in tags. These tags were never documented and superceded by the currently-documented `dev`, `autodocs`, and `test` tags which provide more precise control. The outdated `x-only` tags are removed in 10.0. |
There was a problem hiding this comment.
style: Consider adding migration instructions or examples showing how users should update from the old x-only tags to the new documented tags (dev, autodocs, test).
|
View your CI Pipeline Execution ↗ for commit df9a72c
☁️ Nx Cloud last updated this comment at |
jonniebigodes
left a comment
There was a problem hiding this comment.
@shilman took a pass, and this looks good on my end. However, since we will remove these tags, it wouldn't hurt to check and see where this pattern is being applied in the monorepo and other places. So far, I noticed that we're still referencing them in:
tags-config-stories.tsmy-component-include-tags.mdthat's used in the test runner documentation
And some of the sandboxes may be using these tags.
Approving to unblock you.
|
Thanks @jonniebigodes ! Those are still valid examples/tests, which is why I left them in even though the functionality is removed. I will change them to something else to help avoid any confusion. |
Closes N/A
What I did
See migration notes
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
x-onlytags no longer have any special behavior.🦋 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/coreteam 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
Updated On: 2025-09-01 08:23:31 UTC
This PR removes the undocumented
x-onlybuiltin tags (dev-only,docs-only,test-only) from Storybook as part of preparing for version 10.0. These tags were experimental features that provided automatic filtering behavior but were never officially documented or supported.The changes span multiple areas of the codebase:
Core preset removal: The
tagsfunction incommon-preset.tsthat automatically configured the three x-only tags with their filtering behaviors (excludeFromDocsStories,excludeFromSidebar) has been completely removed.UI component updates: Both
TagsFilter.tsxandTagsFilterPanel.tsxhave been updated to remove these tags from their built-in tag constants. The tags will no longer be hidden from the filter UI and will no longer appear in the built-in tags list.Test cleanup: The end-to-end test suite has been updated to remove tests that verified the special filtering behavior of these deprecated tags.
Documentation: The
MIGRATION.mdfile has been updated with a new section explaining the removal and noting that these deprecated tags have been superseded by the currently documenteddev,autodocs, andtesttags.The changes align with Storybook's move toward a cleaner, more explicit API where users must manually configure any custom tag behaviors they need rather than relying on undocumented built-in functionality. Users who were previously using these tags will need to manually configure equivalent behavior in their Storybook setup if they want to maintain the same filtering functionality.
Confidence score: 4/5