Skip to content

Tags: Remove undocumented x-only tags#32360

Merged
shilman merged 3 commits into
nextfrom
shilman/clean-x-only-tags
Sep 2, 2025
Merged

Tags: Remove undocumented x-only tags#32360
shilman merged 3 commits into
nextfrom
shilman/clean-x-only-tags

Conversation

@shilman
Copy link
Copy Markdown
Member

@shilman shilman commented Sep 1, 2025

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:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

x-only tags 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/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

Updated On: 2025-09-01 08:23:31 UTC

This PR removes the undocumented x-only builtin 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:

  1. Core preset removal: The tags function in common-preset.ts that automatically configured the three x-only tags with their filtering behaviors (excludeFromDocsStories, excludeFromSidebar) has been completely removed.

  2. UI component updates: Both TagsFilter.tsx and TagsFilterPanel.tsx have 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.

  3. Test cleanup: The end-to-end test suite has been updated to remove tests that verified the special filtering behavior of these deprecated tags.

  4. Documentation: The MIGRATION.md file has been updated with a new section explaining the removal and noting that these deprecated tags have been superseded by the currently documented dev, autodocs, and test tags.

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

  • This PR is safe to merge with minimal risk of breaking production functionality
  • Score reflects clean removal of deprecated features with proper documentation and test updates
  • Pay attention to the e2e test file which still contains references to deprecated tags in remaining tests

@shilman shilman added maintenance User-facing maintenance tasks BREAKING CHANGE tags labels Sep 1, 2025
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 files reviewed, 2 comments

Edit Code Review Bot Settings | Greptile

Comment thread MIGRATION.md Outdated
Comment on lines +585 to +586

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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Comment thread MIGRATION.md Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 1, 2025

Fails
🚫 PR is marked with "BREAKING CHANGE" label.

Generated by 🚫 dangerJS against df9a72c

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Sep 1, 2025

View your CI Pipeline Execution ↗ for commit df9a72c

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 46s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-02 23:08:48 UTC

Copy link
Copy Markdown
Contributor

@jonniebigodes jonniebigodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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:

And some of the sandboxes may be using these tags.

Approving to unblock you.

@shilman shilman added the ci:normal Run our default set of CI jobs (choose this for most PRs). label Sep 2, 2025
@shilman
Copy link
Copy Markdown
Member Author

shilman commented Sep 2, 2025

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.

Copy link
Copy Markdown
Member

@yannbf yannbf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@shilman shilman removed the maintenance User-facing maintenance tasks label Sep 2, 2025
@shilman shilman merged commit 99a5faf into next Sep 2, 2025
4 of 6 checks passed
@shilman shilman deleted the shilman/clean-x-only-tags branch September 2, 2025 22:45
@github-actions github-actions Bot mentioned this pull request Sep 2, 2025
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BREAKING CHANGE ci:normal Run our default set of CI jobs (choose this for most PRs). tags

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants