You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When specifying subcomponents for a story (in CSF) the main component's tab shows the component's displayName instead of what's parsed from the default-exported title.
To Reproduce
Create a component which contains subcomponents, and assign the main component a displayName. When viewing the Docs tab, the displayName will show in the first (farthest left) tab.
Additional context
I actually raised this issue in #9444. It was determined to be a bug, but then was marked as fixed, even though the "solution" was only demonstrated with MDX components. As I use CSF, the bug persists.
The text was updated successfully, but these errors were encountered:
As a workaround, have you tried simply overriding your component's displayName inside of your story file? I've had success doing that for a similar issue.
@randak There are surely workarounds, but overriding that property is not a pattern I want to introduce to my team's codebase. 😋
We use displayName, in addition to its debugging benefits, for various targeting functions in composed components as a form of identity. Given that this property is static, it could easily affect other components and/or stories.
Describe the bug
When specifying
subcomponents
for a story (in CSF) the main component's tab shows the component'sdisplayName
instead of what's parsed from the default-exportedtitle
.To Reproduce
Create a component which contains subcomponents, and assign the main component a
displayName
. When viewing the Docs tab, thedisplayName
will show in the first (farthest left) tab.I would expect to see "MainComponent" in the first tab. Instead I see, "MainComponentContainer."
System
Additional context
I actually raised this issue in #9444. It was determined to be a bug, but then was marked as fixed, even though the "solution" was only demonstrated with MDX components. As I use CSF, the bug persists.
The text was updated successfully, but these errors were encountered: