-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(ui-shell): display names for HeaderMenu & SideNavMenu forwardRefs #4680
fix(ui-shell): display names for HeaderMenu & SideNavMenu forwardRefs #4680
Conversation
Deploy preview for the-carbon-components ready! Built with commit d14ad0a https://deploy-preview-4680--the-carbon-components.netlify.com |
Deploy preview for carbon-elements ready! Built with commit d14ad0a |
Deploy preview for carbon-components-react ready! Built with commit d14ad0a https://deploy-preview-4680--carbon-components-react.netlify.com |
Deploy preview for carbon-components-react ready! Built with commit 93216d9 https://deploy-preview-4680--carbon-components-react.netlify.com |
Deploy preview for carbon-elements ready! Built with commit 93216d9 |
Deploy preview for the-carbon-components ready! Built with commit 93216d9 https://deploy-preview-4680--the-carbon-components.netlify.com |
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.
LGTM 👍 - Thanks @jendowns!
@jendowns Could you please updae the snapshot? Thanks! |
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.
Looks good to me!! 🎉
@asudoh I have updated the snapshots, and @joshblack I have updated the export pattern per your feedback. Thank you both! |
Thank you @joshblack! That's a really good point 😅 I just pushed an update that fixes the exports. |
Closes #4679
Adds display names to 2 forwardRef components so that they aren't anonymous.
Easiest way to check on this is view the deployment with the React browser plugin, and specifically inspect these components.
EDIT: note this also helps other forwardRefs that are descendants of these components, like icons, so that their display names will now show up as well.
EDIT 2: I also went ahead and added display names to the story to help with the story source, so that prop tables + source for
SideNav
-related stories shows the component name instead of "Unknown" or "[object Object]"Changelog
Added
SideNav
-related stories to prevent "Unknown" or "[object Object]" in story sourceChanged
HeaderMenu
andSideNavMenu