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 pattern explorer modal #63636

Closed
wants to merge 4 commits into from
Closed
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 @@ -18,13 +18,6 @@

.block-editor-block-patterns-list__item {
height: 100%;
// This is derived from the top padding set on
// `.block-editor-block-patterns-explorer__list`
scroll-margin-top: $grid-unit-30;
// This is derived from the bottom padding set on
// `.block-editor-block-patterns-explorer__list` and
// the bottom margin set on `...__list-item` above
scroll-margin-bottom: ($grid-unit-40 + $grid-unit-30);
Comment on lines -21 to -27
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't get these to apply when viewing the query pattern explorer or the sidebar inserter pattern explorer. None of them had a snapping effect for me.


.block-editor-block-patterns-list__item-title {
flex-grow: 1;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
/**
* WordPress dependencies
*/
import { useState } from '@wordpress/element';
import { useViewportMatch } from '@wordpress/compose';
import { Button, Spinner } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { Spinner } from '@wordpress/components';
import { useSelect } from '@wordpress/data';

/**
* Internal dependencies
*/
import PatternsExplorerModal from '../block-patterns-explorer';
import MobileTabNavigation from '../mobile-tab-navigation';
import { PatternCategoryPreviews } from './pattern-category-previews';
import { usePatternCategories } from './use-pattern-categories';
Expand All @@ -26,8 +23,6 @@ function BlockPatternsTab( {
rootClientId,
children,
} ) {
const [ showPatternsExplorer, setShowPatternsExplorer ] = useState( false );

const categories = usePatternCategories( rootClientId );

const isMobile = useViewportMatch( 'medium', '<' );
Expand Down Expand Up @@ -60,13 +55,6 @@ function BlockPatternsTab( {
>
{ children }
</CategoryTabs>
<Button
className="block-editor-inserter__patterns-explore-button"
onClick={ () => setShowPatternsExplorer( true ) }
variant="secondary"
>
{ __( 'Explore all patterns' ) }
</Button>
</div>
) }
{ isMobile && (
Expand All @@ -84,14 +72,6 @@ function BlockPatternsTab( {
) }
</MobileTabNavigation>
) }
{ showPatternsExplorer && (
<PatternsExplorerModal
initialCategory={ selectedCategory || categories[ 0 ] }
patternCategories={ categories }
onModalClose={ () => setShowPatternsExplorer( false ) }
rootClientId={ rootClientId }
/>
) }
</>
);
}
Expand Down
Loading
Loading