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

Remove "Theme patterns" heading in Pattern library #52570

Merged
merged 1 commit into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ function TemplatePartGroup( { areas, currentArea, currentType } ) {
function ThemePatternsGroup( { categories, currentCategory, currentType } ) {
return (
<>
<div className="edit-site-sidebar-navigation-screen-patterns__group-header">
<Heading level={ 2 }>{ __( 'Theme patterns' ) }</Heading>
</div>
<ItemGroup className="edit-site-sidebar-navigation-screen-patterns__group">
{ categories.map( ( category ) => (
<CategoryItem
Expand Down Expand Up @@ -117,16 +114,16 @@ export default function SidebarNavigationScreenPatterns() {
const templatePartsLink = useLink( { path: '/wp_template_part/all' } );
const footer = ! isMobileViewport ? (
<ItemGroup>
<SidebarNavigationItem withChevron { ...templatePartsLink }>
{ __( 'Manage all template parts' ) }
</SidebarNavigationItem>
<SidebarNavigationItem
as="a"
href="edit.php?post_type=wp_block"
withChevron
>
{ __( 'Manage all of my patterns' ) }
</SidebarNavigationItem>
<SidebarNavigationItem withChevron { ...templatePartsLink }>
{ __( 'Manage all template parts' ) }
</SidebarNavigationItem>
</ItemGroup>
) : undefined;

Expand Down Expand Up @@ -172,20 +169,20 @@ export default function SidebarNavigationScreenPatterns() {
}
/>
</ItemGroup>
{ hasTemplateParts && (
<TemplatePartGroup
areas={ templatePartAreas }
currentArea={ currentCategory }
currentType={ currentType }
/>
) }
{ hasPatterns && (
<ThemePatternsGroup
categories={ patternCategories }
currentCategory={ currentCategory }
currentType={ currentType }
/>
) }
{ hasTemplateParts && (
<TemplatePartGroup
areas={ templatePartAreas }
currentArea={ currentCategory }
currentType={ currentType }
/>
) }
</>
) }
</>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
.edit-site-sidebar-navigation-screen-patterns__group {
margin-bottom: $grid-unit-40;
&:last-of-type,
&:first-of-type {
margin-bottom: $grid-unit-30;

&:last-of-type {
border-bottom: 0;
padding-bottom: 0;
margin-bottom: 0;
}

&:first-of-type {
margin-bottom: $grid-unit-40;
}
}

.edit-site-sidebar-navigation-screen-patterns__group-header {
margin-top: $grid-unit-20;

p {
color: $gray-600;
}
Expand Down