-
Notifications
You must be signed in to change notification settings - Fork 563
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
Add missing displayName to PageHeader.TitleArea and PageHeader.ParentLink #4736
Conversation
|
size-limit report 📦
|
c4fa1dd
to
2b2e30e
Compare
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.
Thanks so much for pushing this PR 🙏🏻 Left two questions 👀 Approving in advance!
@@ -337,6 +337,7 @@ const TitleArea = React.forwardRef<HTMLDivElement, React.PropsWithChildren<Title | |||
) | |||
}, | |||
) as PolymorphicForwardRefComponent<'div', TitleAreaProps> | |||
TitleArea.displayName = 'TitleArea' |
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.
This is great, thanks for adding this! We initially had all sub components FC so I think React was able to infer their names but then we refactored a couple if them.
Do you mind adding the same thing to Parent Link? 🙏🏻
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.
Not at all, updated! Do you think we need it for Root
, too?
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.
I think we have a displayName for Root
export const PageHeader = Object.assign(Root, {
ContextArea,
ParentLink,
ContextBar,
TitleArea,
ContextAreaActions,
LeadingAction,
Breadcrumbs,
LeadingVisual,
Title,
TrailingVisual,
TrailingAction,
Actions,
Description,
Navigation,
})
PageHeader.displayName = 'PageHeader'
2b2e30e
to
3704183
Compare
Changelog
Changed
Added
displayName
toPageHeader.TitleArea
andPageHeader.ParentLink
sub components.Rollout strategy
Testing & Reviewing
Merge checklist