Skip to content

Commit

Permalink
Add quick links header to the templates and pages site editor sidebars
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed May 10, 2023
1 parent 758bc81 commit 02e253f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ export default function SidebarNavigationScreenPages() {
) ?? __( '(no title)' ) }
</PageItem>
) ) }
</ItemGroup>

<SidebarNavigationSubtitle>
{ __( 'Quick links' ) }
</SidebarNavigationSubtitle>
<ItemGroup>
<SidebarNavigationItem
className="edit-site-sidebar-navigation-screen-pages__see-all"
href="edit.php?post_type=page"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import SidebarNavigationItem from '../sidebar-navigation-item';
import AddNewTemplate from '../add-new-template';
import { store as editSiteStore } from '../../store';
import SidebarButton from '../sidebar-button';
import SidebarNavigationSubtitle from '../sidebar-navigation-subtitle';

const config = {
wp_template: {
Expand Down Expand Up @@ -122,7 +123,16 @@ export default function SidebarNavigationScreenTemplates() {
) }
</TemplateItem>
) ) }
{ ! isMobileViewport && (
</ItemGroup>
) }

{ ! isLoading && ! isMobileViewport && (
<>
<SidebarNavigationSubtitle>
{ __( 'Quick links' ) }
</SidebarNavigationSubtitle>

<ItemGroup>
<SidebarNavigationItem
className="edit-site-sidebar-navigation-screen-templates__see-all"
{ ...browseAllLink }
Expand All @@ -131,8 +141,8 @@ export default function SidebarNavigationScreenTemplates() {
}
withChevron
/>
) }
</ItemGroup>
</ItemGroup>
</>
) }
</>
}
Expand Down

0 comments on commit 02e253f

Please sign in to comment.