From 65fd6b9eb57edb37c1e8d2c3d3ff96cb57a19329 Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Sun, 10 Mar 2024 00:02:52 +0000 Subject: [PATCH] Global Styles: Remove the extra unneeded color variations panel (#59718) * Global Styles: Remove the extra unneeded color variations panel * remove the right one Co-authored-by: scruffian Co-authored-by: ramonjd --- .../components/global-styles/color-palette-panel.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/packages/edit-site/src/components/global-styles/color-palette-panel.js b/packages/edit-site/src/components/global-styles/color-palette-panel.js index 0d7496b571a4f..e8c730fe5ca73 100644 --- a/packages/edit-site/src/components/global-styles/color-palette-panel.js +++ b/packages/edit-site/src/components/global-styles/color-palette-panel.js @@ -13,8 +13,6 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor'; * Internal dependencies */ import { unlock } from '../../lock-unlock'; -import ColorVariations from './variations/variations-color'; -import { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../hooks/use-theme-style-variations/use-theme-style-variations-by-property'; const { useGlobalSetting } = unlock( blockEditorPrivateApis ); const mobilePopoverProps = { placement: 'bottom-start', offset: 8 }; @@ -47,12 +45,6 @@ export default function ColorPalettePanel( { name } ) { 'color.defaultPalette', name ); - const colorVariations = useCurrentMergeThemeStyleVariationsWithUserConfig( { - property: 'color', - filter: ( variation ) => - variation?.settings?.color && - Object.keys( variation?.settings?.color ).length, - } ); const isMobileViewport = useViewportMatch( 'small', '<' ); const popoverProps = isMobileViewport ? mobilePopoverProps : undefined; @@ -85,9 +77,6 @@ export default function ColorPalettePanel( { name } ) { popoverProps={ popoverProps } /> ) } - { !! colorVariations.length && ( - - ) }