-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Navigation: Use getTitle to get the navigation title #52635
Changes from all commits
dd6ef51
ec1d0f7
a7f8fb4
dbdd739
3b0f110
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ import TemplatePartNavigationMenuListItem from './template-part-navigation-menu- | |
export default function TemplatePartNavigationMenuList( { menus } ) { | ||
return ( | ||
<ItemGroup className="edit-site-sidebar-navigation-screen-template-part-navigation-menu-list"> | ||
{ menus.map( ( menuId ) => ( | ||
{ [ ...new Set( menus ) ].map( ( menuId ) => ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this change related to the title rendering fix? If we need to ensure that Edit: I just saw the #52707. I think this can be removed here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I don't see a new for |
||
<TemplatePartNavigationMenuListItem | ||
key={ menuId } | ||
Mamaduka marked this conversation as resolved.
Show resolved
Hide resolved
|
||
id={ menuId } | ||
|
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.
Can we just use
record?.title?.rendered || record?.title
here? We can leaveno title
fallback outside of themapSelect
.Using the selector
getTemplateInfo
meant for different entities can have unexpected results in the future.P.S. The
useSelect
is missing a dependency here.