-
-
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
CSF: Deprecate displayName parameter #8775
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/storybook/monorepo/jy21cen3w |
Thinks to check, based on what I encountered in #8508:
Please also update: |
I don't see a deprecation for |
I'd like to release this in 5.3 although it's technically a breaking change. Here's the rationale:
Apologies to semver purists. We're doing our best here! cc @Hypnosphi @igor-dv |
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.
Coupla small things, LGTM otherwise
lib/core/src/client/preview/start.js
Outdated
const displayNameParams = name ? { displayName: name } : {}; | ||
kind.add(storyNameFromExport(key), storyFn, { | ||
const exportName = storyNameFromExport(key); | ||
const idParams = { __id: toId(kindName, exportName) }; |
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.
Should we only pass this if name
is defined?
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.
Hmm could see arguments both ways. I think it's simpler to do the calculation here so it's all in one place.
Co-Authored-By: Tom Coleman <[email protected]>
CSF/MDX: Add component id for permalinks
Issue: #8756 #8507
What I did
story.name
=> story nameparameters.displayName
from CSF loadingdefault.id
to CSF for story perma-linking (see CSF/MDX: Add component id for permalinks #8808)MIGRATION.md
How to test
See updated snapshots