Skip to content
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

Merged
merged 12 commits into from
Nov 20, 2019
Merged

fix(ui-shell): display names for HeaderMenu & SideNavMenu forwardRefs #4680

merged 12 commits into from
Nov 20, 2019

Conversation

jendowns
Copy link
Contributor

@jendowns jendowns commented Nov 14, 2019

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

  • added display names to SideNav-related stories to prevent "Unknown" or "[object Object]" in story source

Changed

  • add display names to HeaderMenu and SideNavMenu

@jendowns jendowns requested a review from a team as a code owner November 14, 2019 16:45
@ghost ghost requested review from abbeyhrt and vpicone November 14, 2019 16:45
@netlify
Copy link

netlify bot commented Nov 14, 2019

Deploy preview for the-carbon-components ready!

Built with commit d14ad0a

https://deploy-preview-4680--the-carbon-components.netlify.com

@netlify
Copy link

netlify bot commented Nov 14, 2019

Deploy preview for carbon-elements ready!

Built with commit d14ad0a

https://deploy-preview-4680--carbon-elements.netlify.com

@netlify
Copy link

netlify bot commented Nov 14, 2019

Deploy preview for carbon-components-react ready!

Built with commit d14ad0a

https://deploy-preview-4680--carbon-components-react.netlify.com

@netlify
Copy link

netlify bot commented Nov 14, 2019

Deploy preview for carbon-components-react ready!

Built with commit 93216d9

https://deploy-preview-4680--carbon-components-react.netlify.com

@netlify
Copy link

netlify bot commented Nov 14, 2019

Deploy preview for carbon-elements ready!

Built with commit 93216d9

https://deploy-preview-4680--carbon-elements.netlify.com

@netlify
Copy link

netlify bot commented Nov 14, 2019

Deploy preview for the-carbon-components ready!

Built with commit 93216d9

https://deploy-preview-4680--the-carbon-components.netlify.com

Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 - Thanks @jendowns!

@asudoh
Copy link
Contributor

asudoh commented Nov 14, 2019

@jendowns Could you please updae the snapshot? Thanks!

Copy link
Contributor

@abbeyhrt abbeyhrt left a 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!! 🎉

@jendowns
Copy link
Contributor Author

@asudoh I have updated the snapshots, and @joshblack I have updated the export pattern per your feedback. Thank you both!

@jendowns jendowns requested a review from a team as a code owner November 19, 2019 19:45
@ghost ghost requested a review from aledavila November 19, 2019 19:45
@jendowns
Copy link
Contributor Author

Thank you @joshblack! That's a really good point 😅 I just pushed an update that fixes the exports.

@asudoh asudoh merged commit 6a0cfea into carbon-design-system:master Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UIShell] HeaderMenu and SideNavMenu forwardsRefs have no displayName & are Anonymous
4 participants