Skip to content

Commit

Permalink
skip serialization for shadow when the support is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
madhusudhand committed Jan 23, 2024
1 parent 4220d9f commit 1bc8d97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/block-editor/src/hooks/effects.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import StylesEffectsPanel, {
import { InspectorControls } from '../components';
import { store as blockEditorStore } from '../store';

export const EFFECTS_SUPPORT_KEYS = [ 'shadow' ];
export const SHADOW_SUPPORT_KEY = 'shadow';
export const EFFECTS_SUPPORT_KEYS = [ SHADOW_SUPPORT_KEY ];

export function hasEffectsSupport( blockName ) {
return EFFECTS_SUPPORT_KEYS.some( ( key ) =>
Expand Down
7 changes: 6 additions & 1 deletion packages/block-editor/src/hooks/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ import {
SPACING_SUPPORT_KEY,
DimensionsPanel,
} from './dimensions';
import { EFFECTS_SUPPORT_KEYS, EffectsPanel } from './effects';
import {
EFFECTS_SUPPORT_KEYS,
SHADOW_SUPPORT_KEY,
EffectsPanel,
} from './effects';
import {
shouldSkipSerialization,
useStyleOverride,
Expand Down Expand Up @@ -112,6 +116,7 @@ const skipSerializationPathsEdit = {
[ `${ SPACING_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [
SPACING_SUPPORT_KEY,
],
[ `${ SHADOW_SUPPORT_KEY }` ]: [ SHADOW_SUPPORT_KEY ],
};

/**
Expand Down

0 comments on commit 1bc8d97

Please sign in to comment.