Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

name is changed when composing stories #107

Closed
IanVS opened this issue Jun 13, 2022 · 1 comment
Closed

name is changed when composing stories #107

IanVS opened this issue Jun 13, 2022 · 1 comment

Comments

@IanVS
Copy link
Member

IanVS commented Jun 13, 2022

Describe the bug
According to storybookjs/storybook#18464 (review), name should be used for csf3 stories. However, when I run composeStory from testing-react, the name changes to something like composedStory2. I'd really like to have the name remain unchanged when composing stories.

To Reproduce
https://github.com/IanVS/composed-story-name-reproduction

npm i
npm run storybook

Open the Primary Named story, which uses the Helper.jsx component to render a composed story as well as its name.

Expected behavior
The name of the resulting story should be the csf3 name.

Screenshots
image

@IanVS
Copy link
Member Author

IanVS commented Jun 15, 2022

I looked into this a bit, and there's no real way around it, since name is a protected property in composedStory, which is a function in composeStory. But, I see that it also already converts name into storyName, so I can use that. I've pushed up a small PR #108 to add a test for this case. But, this issue can be closed out as-is.

@IanVS IanVS closed this as not planned Won't fix, can't repro, duplicate, stale Jun 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant