From f432bc285a334663052da9c367860b01e0c2c585 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Wed, 30 Aug 2023 11:03:35 +1200 Subject: [PATCH] Remove sync toggle for now --- .../components/inserter/block-patterns-tab.js | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/packages/block-editor/src/components/inserter/block-patterns-tab.js b/packages/block-editor/src/components/inserter/block-patterns-tab.js index 3ab16aecaf46e..8b15eab88e0f0 100644 --- a/packages/block-editor/src/components/inserter/block-patterns-tab.js +++ b/packages/block-editor/src/components/inserter/block-patterns-tab.js @@ -16,8 +16,6 @@ import { __experimentalHStack as HStack, FlexBlock, Button, - __experimentalToggleGroupControl as ToggleGroupControl, - __experimentalToggleGroupControlOption as ToggleGroupControlOption, } from '@wordpress/components'; import { Icon, chevronRight, chevronLeft } from '@wordpress/icons'; import { focus } from '@wordpress/dom'; @@ -51,15 +49,6 @@ export const allPatternsCategory = { name: 'allPatterns', label: __( 'All patterns' ), }; -export const SYNC_TYPES = { - full: 'fully', - unsynced: 'unsynced', -}; -const SYNC_FILTERS = { - all: __( 'All' ), - [ SYNC_TYPES.full ]: __( 'My synced' ), - [ SYNC_TYPES.unsynced ]: __( 'My standard' ), -}; function usePatternsCategories( rootClientId ) { const { patterns: allPatterns, allCategories } = usePatternsState( @@ -168,11 +157,6 @@ export function BlockPatternsCategoryPanel( { onInsert, rootClientId ); - const [ syncFilter, setSyncFilter ] = useState( 'all' ); - const updateSyncFilter = ( value ) => { - //setCurrentPage( 1 ); - setSyncFilter( value ); - }; const availableCategories = usePatternsCategories( rootClientId ); const currentCategoryPatterns = useMemo( () => @@ -224,28 +208,6 @@ export function BlockPatternsCategoryPanel( { { category.label }

{ category.description }

- { category.name === allPatternsCategory.name && ( - updateSyncFilter( value ) } - __nextHasNoMarginBottom - > - { Object.entries( SYNC_FILTERS ).map( - ( [ key, label ] ) => ( - - ) - ) } - - ) }