Skip to content

fix: sanitize story titles#328

Merged
AriPerkkio merged 1 commit intomainfrom
ari/fix-sanitize-title
Apr 29, 2026
Merged

fix: sanitize story titles#328
AriPerkkio merged 1 commit intomainfrom
ari/fix-sanitize-title

Conversation

@AriPerkkio
Copy link
Copy Markdown
Member

Issue: Related to #295

What Changed

Makes sure Story-files don't end up with titles that are incompatible with Storybook.

For example "title": "src/Accordion/Accordion/<Accordion />/should render and not be controlled" would have caused following crash:

image

How to test

  1. Add plugin to https://github.com/mui/material-ui
  2. Run tests
  3. pnpm exec archive-storybook
  4. Storybook fails to render stories with the error shown above.

Error originates from https://github.com/mui/material-ui/blob/64f0b491155616b44e41421c6cb5513f32b22391/packages/mui-material/src/Accordion/Accordion.test.js#L27 test title.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 29, 2026

⚠️ No Changeset found

Latest commit: 8658553

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@AriPerkkio AriPerkkio self-assigned this Apr 29, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.47%. Comparing base (ed87541) to head (8658553).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #328   +/-   ##
=======================================
  Coverage   91.47%   91.47%           
=======================================
  Files          22       22           
  Lines         598      598           
  Branches      109      109           
=======================================
  Hits          547      547           
  Misses         48       48           
  Partials        3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AriPerkkio AriPerkkio merged commit 89f7beb into main Apr 29, 2026
12 checks passed
@AriPerkkio AriPerkkio deleted the ari/fix-sanitize-title branch April 29, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants