From c25a906f9170eac10a8aa0e0cb92d05697e6ec1b Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Thu, 9 Nov 2023 14:14:23 +1300 Subject: [PATCH 1/6] Add a core selector to get user patterns instead of using a generic getEntity call --- docs/reference-guides/data/data-core.md | 12 ++++++++ packages/core-data/README.md | 12 ++++++++ packages/core-data/src/reducer.js | 10 +++++++ packages/core-data/src/resolvers.js | 17 +++++++++++ packages/core-data/src/selectors.ts | 13 +++++++- .../delete-category-menu-item.js | 6 +--- .../components/page-patterns/use-patterns.js | 30 +++++-------------- .../src/components/create-pattern-modal.js | 1 + 8 files changed, 73 insertions(+), 28 deletions(-) diff --git a/docs/reference-guides/data/data-core.md b/docs/reference-guides/data/data-core.md index ea97ce28e4d85c..cbf31f1f0a0560 100644 --- a/docs/reference-guides/data/data-core.md +++ b/docs/reference-guides/data/data-core.md @@ -458,6 +458,18 @@ _Returns_ - `Array< UserPatternCategory >`: User patterns category array. +### getUserPatterns + +Retrieve the list of registered user patterns. + +_Parameters_ + +- _state_ `State`: Data state. + +_Returns_ + +- `Array< any >`: User pattern list. + ### getUserQueryResults Returns all the users returned by a query ID. diff --git a/packages/core-data/README.md b/packages/core-data/README.md index ef5d9c1197f099..c8c9f132c68feb 100644 --- a/packages/core-data/README.md +++ b/packages/core-data/README.md @@ -765,6 +765,18 @@ _Returns_ - `Array< UserPatternCategory >`: User patterns category array. +### getUserPatterns + +Retrieve the list of registered user patterns. + +_Parameters_ + +- _state_ `State`: Data state. + +_Returns_ + +- `Array< any >`: User pattern list. + ### getUserQueryResults Returns all the users returned by a query ID. diff --git a/packages/core-data/src/reducer.js b/packages/core-data/src/reducer.js index a21623d8ba89d3..89239126bd88ad 100644 --- a/packages/core-data/src/reducer.js +++ b/packages/core-data/src/reducer.js @@ -535,6 +535,15 @@ export function blockPatternCategories( state = [], action ) { return state; } +export function userPatterns( state = [], action ) { + switch ( action.type ) { + case 'RECEIVE_USER_PATTERNS': + return action.userPatterns; + } + + return state; +} + export function userPatternCategories( state = [], action ) { switch ( action.type ) { case 'RECEIVE_USER_PATTERN_CATEGORIES': @@ -610,6 +619,7 @@ export default combineReducers( { autosaves, blockPatterns, blockPatternCategories, + userPatterns, userPatternCategories, navigationFallbackId, defaultTemplates, diff --git a/packages/core-data/src/resolvers.js b/packages/core-data/src/resolvers.js index cd2a65a60b0139..4c6f53eb9f607a 100644 --- a/packages/core-data/src/resolvers.js +++ b/packages/core-data/src/resolvers.js @@ -668,6 +668,23 @@ export const getUserPatternCategories = } ); }; +export const getUserPatterns = + () => + async ( { dispatch, resolveSelect } ) => { + const userPatterns = await resolveSelect.getEntityRecords( + 'postType', + 'wp_block', + { + per_page: -1, + } + ); + + dispatch( { + type: 'RECEIVE_USER_PATTERNS', + userPatterns, + } ); + }; + export const getNavigationFallbackId = () => async ( { dispatch, select } ) => { diff --git a/packages/core-data/src/selectors.ts b/packages/core-data/src/selectors.ts index 2a046941611c7d..bab2123880ce93 100644 --- a/packages/core-data/src/selectors.ts +++ b/packages/core-data/src/selectors.ts @@ -45,6 +45,7 @@ export interface State { userPermissions: Record< string, boolean >; users: UserState; navigationFallbackId: EntityRecordKey; + userPatterns: Array< unknown >; userPatternCategories: Array< UserPatternCategory >; defaultTemplates: Record< string, string >; } @@ -1325,6 +1326,17 @@ export function getBlockPatternCategories( state: State ): Array< any > { return state.blockPatternCategories; } +/** + * Retrieve the list of registered user patterns. + * + * @param state Data state. + * + * @return User pattern list. + */ +export function getUserPatterns( state: State ): Array< any > { + return state.userPatterns; +} + /** * Retrieve the registered user pattern categories. * @@ -1332,7 +1344,6 @@ export function getBlockPatternCategories( state: State ): Array< any > { * * @return User patterns category array. */ - export function getUserPatternCategories( state: State ): Array< UserPatternCategory > { diff --git a/packages/edit-site/src/components/page-patterns/delete-category-menu-item.js b/packages/edit-site/src/components/page-patterns/delete-category-menu-item.js index 0a9a36d93d0099..a900aae71f2d96 100644 --- a/packages/edit-site/src/components/page-patterns/delete-category-menu-item.js +++ b/packages/edit-site/src/components/page-patterns/delete-category-menu-item.js @@ -43,11 +43,7 @@ export default function DeleteCategoryMenuItem( { category, onClose } ) { // Prevent the need to refresh the page to get up-to-date categories // and pattern categorization. invalidateResolution( 'getUserPatternCategories' ); - invalidateResolution( 'getEntityRecords', [ - 'postType', - PATTERN_TYPES.user, - { per_page: -1 }, - ] ); + invalidateResolution( 'getUserPatterns' ); createSuccessNotice( sprintf( diff --git a/packages/edit-site/src/components/page-patterns/use-patterns.js b/packages/edit-site/src/components/page-patterns/use-patterns.js index 9cb6c8b998c412..c69d4331380974 100644 --- a/packages/edit-site/src/components/page-patterns/use-patterns.js +++ b/packages/edit-site/src/components/page-patterns/use-patterns.js @@ -211,31 +211,23 @@ const patternBlockToPattern = ( patternBlock, categories ) => ( { const selectUserPatterns = createSelector( ( select, syncStatus, search = '' ) => { - const { getEntityRecords, getIsResolving, getUserPatternCategories } = + const { getIsResolving, getUserPatternCategories, getUserPatterns } = select( coreStore ); - const query = { per_page: -1 }; - const records = getEntityRecords( - 'postType', - PATTERN_TYPES.user, - query - ); + const userPatterns = getUserPatterns(); const userPatternCategories = getUserPatternCategories(); const categories = new Map(); userPatternCategories.forEach( ( userCategory ) => categories.set( userCategory.id, userCategory ) ); - let patterns = records - ? records.map( ( record ) => + + let patterns = userPatterns + ? userPatterns.map( ( record ) => patternBlockToPattern( record, categories ) ) : EMPTY_PATTERN_LIST; - const isResolving = getIsResolving( 'getEntityRecords', [ - 'postType', - PATTERN_TYPES.user, - query, - ] ); + const isResolving = getIsResolving( 'getUserPatterns' ); if ( syncStatus ) { patterns = patterns.filter( @@ -257,14 +249,8 @@ const selectUserPatterns = createSelector( }; }, ( select ) => [ - select( coreStore ).getEntityRecords( 'postType', PATTERN_TYPES.user, { - per_page: -1, - } ), - select( coreStore ).getIsResolving( 'getEntityRecords', [ - 'postType', - PATTERN_TYPES.user, - { per_page: -1 }, - ] ), + select( coreStore ).getUserPatterns(), + select( coreStore ).getIsResolving( 'getUserPatterns' ), select( coreStore ).getUserPatternCategories(), ] ); diff --git a/packages/patterns/src/components/create-pattern-modal.js b/packages/patterns/src/components/create-pattern-modal.js index 22d20fd0372657..494095aa3c19ca 100644 --- a/packages/patterns/src/components/create-pattern-modal.js +++ b/packages/patterns/src/components/create-pattern-modal.js @@ -103,6 +103,7 @@ export default function CreatePatternModal( { typeof content === 'function' ? content() : content, categories ); + invalidateResolution( 'getUserPatterns' ); onSuccess( { pattern: newPattern, categoryId: PATTERN_DEFAULT_CATEGORY, From 048ec3aa4ae027fbfd94a42436f737f2b1258d2c Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Mon, 13 Nov 2023 11:07:23 +1300 Subject: [PATCH 2/6] Also use the new selector in the block editor --- packages/block-editor/src/store/selectors.js | 41 +++++-------------- packages/core-data/src/selectors.ts | 40 ++++++++++++++++-- .../components/page-patterns/use-patterns.js | 34 +-------------- .../provider/use-block-editor-settings.js | 5 +++ 4 files changed, 54 insertions(+), 66 deletions(-) diff --git a/packages/block-editor/src/store/selectors.js b/packages/block-editor/src/store/selectors.js index 548ad71664b5e6..673e3f57f30eaf 100644 --- a/packages/block-editor/src/store/selectors.js +++ b/packages/block-editor/src/store/selectors.js @@ -2274,31 +2274,6 @@ const checkAllowListRecursive = ( blocks, allowedBlockTypes ) => { return true; }; -function getUserPatterns( state ) { - const userPatterns = - state?.settings?.__experimentalReusableBlocks ?? EMPTY_ARRAY; - const userPatternCategories = - state?.settings?.__experimentalUserPatternCategories ?? []; - const categories = new Map(); - userPatternCategories.forEach( ( userCategory ) => - categories.set( userCategory.id, userCategory ) - ); - return userPatterns.map( ( userPattern ) => { - return { - name: `core/block/${ userPattern.id }`, - id: userPattern.id, - title: userPattern.title.raw, - categories: userPattern.wp_pattern_category.map( ( catId ) => - categories && categories.get( catId ) - ? categories.get( catId ).slug - : catId - ), - content: userPattern.content.raw, - syncStatus: userPattern.wp_pattern_sync_status, - }; - } ); -} - export const __experimentalUserPatternCategories = createSelector( ( state ) => { return state?.settings?.__experimentalUserPatternCategories; @@ -2309,7 +2284,7 @@ export const __experimentalUserPatternCategories = createSelector( export const __experimentalGetParsedPattern = createSelector( ( state, patternName ) => { const patterns = state.settings.__experimentalBlockPatterns; - const userPatterns = getUserPatterns( state ); + const userPatterns = state.settings.__experimentalUserPatterns; const pattern = [ ...patterns, ...userPatterns ].find( ( { name } ) => name === patternName @@ -2317,24 +2292,28 @@ export const __experimentalGetParsedPattern = createSelector( if ( ! pattern ) { return null; } + return { ...pattern, - blocks: parse( pattern.content, { - __unstableSkipMigrationLogs: true, - } ), + blocks: pattern.blocks + ? pattern.blocks + : parse( pattern.content, { + __unstableSkipMigrationLogs: true, + } ), }; }, ( state ) => [ state.settings.__experimentalBlockPatterns, state.settings.__experimentalReusableBlocks, state?.settings?.__experimentalUserPatternCategories, + state?.settings?.__experimentalUserPatterns, ] ); const getAllAllowedPatterns = createSelector( ( state ) => { const patterns = state.settings.__experimentalBlockPatterns; - const userPatterns = getUserPatterns( state ); + const userPatterns = state.settings.__experimentalUserPatterns; const { allowedBlockTypes } = getSettings( state ); @@ -2350,7 +2329,7 @@ const getAllAllowedPatterns = createSelector( }, ( state ) => [ state.settings.__experimentalBlockPatterns, - state.settings.__experimentalReusableBlocks, + state.settings.__experimentalUserPatterns, state.settings.allowedBlockTypes, state?.settings?.__experimentalUserPatternCategories, ] diff --git a/packages/core-data/src/selectors.ts b/packages/core-data/src/selectors.ts index bab2123880ce93..b0f8f780437f3e 100644 --- a/packages/core-data/src/selectors.ts +++ b/packages/core-data/src/selectors.ts @@ -9,6 +9,7 @@ import createSelector from 'rememo'; import { createRegistrySelector } from '@wordpress/data'; import { addQueryArgs } from '@wordpress/url'; import deprecated from '@wordpress/deprecated'; +import { parse } from '@wordpress/blocks'; /** * Internal dependencies @@ -1333,9 +1334,42 @@ export function getBlockPatternCategories( state: State ): Array< any > { * * @return User pattern list. */ -export function getUserPatterns( state: State ): Array< any > { - return state.userPatterns; -} +export const getUserPatterns = createSelector( + ( state: State ): Array< unknown > => { + const categories = new Map(); + state.userPatternCategories.forEach( ( userCategory ) => + categories.set( userCategory.id, userCategory ) + ); + + return state.userPatterns.map( ( patternBlock: any ) => ( { + blocks: parse( patternBlock.content.raw, { + __unstableSkipMigrationLogs: true, + } ), + ...( patternBlock.wp_pattern_category.length > 0 && { + categories: patternBlock.wp_pattern_category.map( + ( patternCategoryId ) => + categories && categories.get( patternCategoryId ) + ? categories.get( patternCategoryId ).slug + : patternCategoryId + ), + } ), + termLabels: patternBlock.wp_pattern_category.map( + ( patternCategoryId ) => + categories?.get( patternCategoryId ) + ? categories.get( patternCategoryId ).label + : patternCategoryId + ), + id: patternBlock.id, + name: `core/block/${ patternBlock.id }`, + slug: patternBlock.slug, + syncStatus: patternBlock.wp_pattern_sync_status, + title: patternBlock.title.raw, + type: 'wp_block', + patternBlock, + } ) ); + }, + ( state ) => [ state.userPatternCategories, state.userPatterns ] +); /** * Retrieve the registered user pattern categories. diff --git a/packages/edit-site/src/components/page-patterns/use-patterns.js b/packages/edit-site/src/components/page-patterns/use-patterns.js index c69d4331380974..9cf7334e5f8ea7 100644 --- a/packages/edit-site/src/components/page-patterns/use-patterns.js +++ b/packages/edit-site/src/components/page-patterns/use-patterns.js @@ -184,49 +184,19 @@ const selectPatterns = createSelector( ] ); -const patternBlockToPattern = ( patternBlock, categories ) => ( { - blocks: parse( patternBlock.content.raw, { - __unstableSkipMigrationLogs: true, - } ), - ...( patternBlock.wp_pattern_category.length > 0 && { - categories: patternBlock.wp_pattern_category.map( - ( patternCategoryId ) => - categories && categories.get( patternCategoryId ) - ? categories.get( patternCategoryId ).slug - : patternCategoryId - ), - } ), - termLabels: patternBlock.wp_pattern_category.map( ( patternCategoryId ) => - categories?.get( patternCategoryId ) - ? categories.get( patternCategoryId ).label - : patternCategoryId - ), - id: patternBlock.id, - name: patternBlock.slug, - syncStatus: patternBlock.wp_pattern_sync_status || PATTERN_SYNC_TYPES.full, - title: patternBlock.title.raw, - type: PATTERN_TYPES.user, - patternBlock, -} ); - const selectUserPatterns = createSelector( ( select, syncStatus, search = '' ) => { const { getIsResolving, getUserPatternCategories, getUserPatterns } = select( coreStore ); - const userPatterns = getUserPatterns(); + let patterns = getUserPatterns(); + console.log( 'hmm', patterns ); const userPatternCategories = getUserPatternCategories(); const categories = new Map(); userPatternCategories.forEach( ( userCategory ) => categories.set( userCategory.id, userCategory ) ); - let patterns = userPatterns - ? userPatterns.map( ( record ) => - patternBlockToPattern( record, categories ) - ) - : EMPTY_PATTERN_LIST; - const isResolving = getIsResolving( 'getUserPatterns' ); if ( syncStatus ) { diff --git a/packages/editor/src/components/provider/use-block-editor-settings.js b/packages/editor/src/components/provider/use-block-editor-settings.js index c0804febab0db5..ed5a2182c0b5ba 100644 --- a/packages/editor/src/components/provider/use-block-editor-settings.js +++ b/packages/editor/src/components/provider/use-block-editor-settings.js @@ -98,6 +98,7 @@ function useBlockEditorSettings( settings, postType, postId ) { pageOnFront, pageForPosts, userPatternCategories, + userPatterns, } = useSelect( ( select ) => { const isWeb = Platform.OS === 'web'; @@ -107,6 +108,7 @@ function useBlockEditorSettings( settings, postType, postId ) { getEntityRecord, getUserPatternCategories, getEntityRecords, + getUserPatterns, } = select( coreStore ); const siteSettings = canUser( 'read', 'settings' ) @@ -129,6 +131,7 @@ function useBlockEditorSettings( settings, postType, postId ) { pageOnFront: siteSettings?.page_on_front, pageForPosts: siteSettings?.page_for_posts, userPatternCategories: getUserPatternCategories(), + userPatterns: getUserPatterns(), }; }, [ postType, postId ] @@ -219,6 +222,7 @@ function useBlockEditorSettings( settings, postType, postId ) { __experimentalBlockPatterns: blockPatterns, __experimentalBlockPatternCategories: blockPatternCategories, __experimentalUserPatternCategories: userPatternCategories, + __experimentalUserPatterns: userPatterns, __experimentalFetchLinkSuggestions: ( search, searchOptions ) => fetchLinkSuggestions( search, searchOptions, settings ), inserterMediaCategories, @@ -252,6 +256,7 @@ function useBlockEditorSettings( settings, postType, postId ) { pageOnFront, pageForPosts, postType, + userPatterns, ] ); } From b25ff5205a3316873946521a44869fa298662f49 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Thu, 9 Nov 2023 16:34:40 +1300 Subject: [PATCH 3/6] Tidy up block editor selectors --- packages/block-editor/src/store/selectors.js | 5 ++--- packages/core-data/src/selectors.ts | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/block-editor/src/store/selectors.js b/packages/block-editor/src/store/selectors.js index 673e3f57f30eaf..8f33cbd4c8354c 100644 --- a/packages/block-editor/src/store/selectors.js +++ b/packages/block-editor/src/store/selectors.js @@ -2284,7 +2284,7 @@ export const __experimentalUserPatternCategories = createSelector( export const __experimentalGetParsedPattern = createSelector( ( state, patternName ) => { const patterns = state.settings.__experimentalBlockPatterns; - const userPatterns = state.settings.__experimentalUserPatterns; + const userPatterns = state.settings.__experimentalUserPatterns || []; const pattern = [ ...patterns, ...userPatterns ].find( ( { name } ) => name === patternName @@ -2304,7 +2304,6 @@ export const __experimentalGetParsedPattern = createSelector( }, ( state ) => [ state.settings.__experimentalBlockPatterns, - state.settings.__experimentalReusableBlocks, state?.settings?.__experimentalUserPatternCategories, state?.settings?.__experimentalUserPatterns, ] @@ -2313,7 +2312,7 @@ export const __experimentalGetParsedPattern = createSelector( const getAllAllowedPatterns = createSelector( ( state ) => { const patterns = state.settings.__experimentalBlockPatterns; - const userPatterns = state.settings.__experimentalUserPatterns; + const userPatterns = state.settings.__experimentalUserPatterns || []; const { allowedBlockTypes } = getSettings( state ); diff --git a/packages/core-data/src/selectors.ts b/packages/core-data/src/selectors.ts index b0f8f780437f3e..f1532a024953ff 100644 --- a/packages/core-data/src/selectors.ts +++ b/packages/core-data/src/selectors.ts @@ -1362,7 +1362,7 @@ export const getUserPatterns = createSelector( id: patternBlock.id, name: `core/block/${ patternBlock.id }`, slug: patternBlock.slug, - syncStatus: patternBlock.wp_pattern_sync_status, + syncStatus: patternBlock.wp_pattern_sync_status || 'fully', title: patternBlock.title.raw, type: 'wp_block', patternBlock, From 3d318fe5843ac2ca9bc4a02002c186b00260f24f Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Mon, 13 Nov 2023 11:14:05 +1300 Subject: [PATCH 4/6] Fix synced icon display --- .../components/block-patterns-list/index.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/block-editor/src/components/block-patterns-list/index.js b/packages/block-editor/src/components/block-patterns-list/index.js index bebeb1f44184cd..ecae484462bfbb 100644 --- a/packages/block-editor/src/components/block-patterns-list/index.js +++ b/packages/block-editor/src/components/block-patterns-list/index.js @@ -105,16 +105,16 @@ function BlockPattern( { blocks={ blocks } viewportWidth={ viewportWidth } /> - - { pattern.id && ! pattern.syncStatus && ( -
- -
- ) } + { pattern.id && + pattern.syncStatus === 'fully' && ( +
+ +
+ ) } { ( ! showTooltip || pattern.id ) && (
{ pattern.title } From 5957a0cece3a0a2169f944f685891c12ce72cd49 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Mon, 13 Nov 2023 11:57:11 +1300 Subject: [PATCH 5/6] Add additional types --- docs/reference-guides/data/data-core.md | 2 +- packages/core-data/README.md | 2 +- packages/core-data/src/selectors.ts | 24 ++++++++++++++---------- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/docs/reference-guides/data/data-core.md b/docs/reference-guides/data/data-core.md index cbf31f1f0a0560..e96e28c6793dad 100644 --- a/docs/reference-guides/data/data-core.md +++ b/docs/reference-guides/data/data-core.md @@ -468,7 +468,7 @@ _Parameters_ _Returns_ -- `Array< any >`: User pattern list. +- `Array< UserPattern >`: User pattern list. ### getUserQueryResults diff --git a/packages/core-data/README.md b/packages/core-data/README.md index c8c9f132c68feb..4feae756e7d868 100644 --- a/packages/core-data/README.md +++ b/packages/core-data/README.md @@ -775,7 +775,7 @@ _Parameters_ _Returns_ -- `Array< any >`: User pattern list. +- `Array< UserPattern >`: User pattern list. ### getUserQueryResults diff --git a/packages/core-data/src/selectors.ts b/packages/core-data/src/selectors.ts index f1532a024953ff..baa6fa8d2b6bb3 100644 --- a/packages/core-data/src/selectors.ts +++ b/packages/core-data/src/selectors.ts @@ -46,7 +46,7 @@ export interface State { userPermissions: Record< string, boolean >; users: UserState; navigationFallbackId: EntityRecordKey; - userPatterns: Array< unknown >; + userPatterns: Array< UserPattern >; userPatternCategories: Array< UserPatternCategory >; defaultTemplates: Record< string, string >; } @@ -98,6 +98,17 @@ export interface UserPatternCategory { description: string; } +export interface UserPattern { + blocks: Array< unknown >; + categories?: Array< string >; + id: string; + name: string; + slug: string; + syncStatus: string; + title: string; + type: string; +} + type Optional< T > = T | undefined; /** @@ -1335,7 +1346,7 @@ export function getBlockPatternCategories( state: State ): Array< any > { * @return User pattern list. */ export const getUserPatterns = createSelector( - ( state: State ): Array< unknown > => { + ( state: State ): Array< UserPattern > => { const categories = new Map(); state.userPatternCategories.forEach( ( userCategory ) => categories.set( userCategory.id, userCategory ) @@ -1347,25 +1358,18 @@ export const getUserPatterns = createSelector( } ), ...( patternBlock.wp_pattern_category.length > 0 && { categories: patternBlock.wp_pattern_category.map( - ( patternCategoryId ) => + ( patternCategoryId: number ) => categories && categories.get( patternCategoryId ) ? categories.get( patternCategoryId ).slug : patternCategoryId ), } ), - termLabels: patternBlock.wp_pattern_category.map( - ( patternCategoryId ) => - categories?.get( patternCategoryId ) - ? categories.get( patternCategoryId ).label - : patternCategoryId - ), id: patternBlock.id, name: `core/block/${ patternBlock.id }`, slug: patternBlock.slug, syncStatus: patternBlock.wp_pattern_sync_status || 'fully', title: patternBlock.title.raw, type: 'wp_block', - patternBlock, } ) ); }, ( state ) => [ state.userPatternCategories, state.userPatterns ] From b9e6622534bd3333a67650ff7af35c3ac7e586a9 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Mon, 13 Nov 2023 15:53:36 +1300 Subject: [PATCH 6/6] Remove console.log --- packages/edit-site/src/components/page-patterns/use-patterns.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/edit-site/src/components/page-patterns/use-patterns.js b/packages/edit-site/src/components/page-patterns/use-patterns.js index 9cf7334e5f8ea7..61dd09bdb6b318 100644 --- a/packages/edit-site/src/components/page-patterns/use-patterns.js +++ b/packages/edit-site/src/components/page-patterns/use-patterns.js @@ -190,7 +190,6 @@ const selectUserPatterns = createSelector( select( coreStore ); let patterns = getUserPatterns(); - console.log( 'hmm', patterns ); const userPatternCategories = getUserPatternCategories(); const categories = new Map(); userPatternCategories.forEach( ( userCategory ) =>