Skip to content

Commit

Permalink
removed container deprecation for the opacity and color update
Browse files Browse the repository at this point in the history
  • Loading branch information
prconcepcion committed Oct 11, 2023
1 parent ddf3afe commit f2ba2a4
Show file tree
Hide file tree
Showing 13 changed files with 181 additions and 181 deletions.
26 changes: 13 additions & 13 deletions src/block/blockquote/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ const deprecated = [
// before, now it's not allowed. Turn on the container to mimic the
// effect. This goes first before the container paddings check below
// because we need to set the paddings to zero for this to work.
const hasContainerBorders = !! attributes.containerBorderType ||
( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
!! attributes.containerShadow
// const hasContainerBorders = !! attributes.containerBorderType ||
// ( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
// !! attributes.containerShadow

if ( ! attributes.hasContainer && hasContainerBorders ) {
newAttributes = {
...newAttributes,
hasContainer: true,
containerPadding: {
top: 0, right: 0, bottom: 0, left: 0,
},
containerBackgroundColor: 'transparent',
}
}
// if ( ! attributes.hasContainer && hasContainerBorders ) {
// newAttributes = {
// ...newAttributes,
// hasContainer: true,
// containerPadding: {
// top: 0, right: 0, bottom: 0, left: 0,
// },
// containerBackgroundColor: 'transparent',
// }
// }

newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes )
newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes )
Expand Down
28 changes: 14 additions & 14 deletions src/block/call-to-action/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,20 @@ const deprecated = [
// before, now it's not allowed. Turn on the container to mimic the
// effect. This goes first before the container paddings check below
// because we need to set the paddings to zero for this to work.
const hasContainerBorders = !! attributes.containerBorderType ||
( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
!! attributes.containerShadow

if ( ! attributes.hasContainer && hasContainerBorders ) {
newAttributes = {
...newAttributes,
hasContainer: true,
containerPadding: {
top: 0, right: 0, bottom: 0, left: 0,
},
containerBackgroundColor: 'transparent',
}
}
// const hasContainerBorders = !! attributes.containerBorderType ||
// ( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
// !! attributes.containerShadow

// if ( ! attributes.hasContainer && hasContainerBorders ) {
// newAttributes = {
// ...newAttributes,
// hasContainer: true,
// containerPadding: {
// top: 0, right: 0, bottom: 0, left: 0,
// },
// containerBackgroundColor: 'transparent',
// }
// }

// If the inner blocks are horizontal, adjust to accomodate the new
// column gap, it will modify blocks because people used block
Expand Down
28 changes: 14 additions & 14 deletions src/block/card/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,20 @@ const deprecated = [
// before, now it's not allowed. Turn on the container to mimic the
// effect. This goes first before the container paddings check below
// because we need to set the paddings to zero for this to work.
const hasContainerBorders = !! attributes.containerBorderType ||
( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
!! attributes.containerShadow

if ( ! attributes.hasContainer && hasContainerBorders ) {
newAttributes = {
...newAttributes,
hasContainer: true,
containerPadding: {
top: 0, right: 0, bottom: 0, left: 0,
},
containerBackgroundColor: 'transparent',
}
}
// const hasContainerBorders = !! attributes.containerBorderType ||
// ( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
// !! attributes.containerShadow

// if ( ! attributes.hasContainer && hasContainerBorders ) {
// newAttributes = {
// ...newAttributes,
// hasContainer: true,
// containerPadding: {
// top: 0, right: 0, bottom: 0, left: 0,
// },
// containerBackgroundColor: 'transparent',
// }
// }

// If the inner blocks are horizontal, adjust to accomodate the new
// column gap, it will modify blocks because people used block
Expand Down
28 changes: 14 additions & 14 deletions src/block/column/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,20 @@ const deprecated = [
// before, now it's not allowed. Turn on the container to mimic the
// effect. This goes first before the container paddings check below
// because we need to set the paddings to zero for this to work.
const hasContainerBorders = !! attributes.containerBorderType ||
( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
!! attributes.containerShadow

if ( ! attributes.hasContainer && hasContainerBorders ) {
newAttributes = {
...newAttributes,
hasContainer: true,
containerPadding: {
top: 0, right: 0, bottom: 0, left: 0,
},
containerBackgroundColor: 'transparent',
}
}
// const hasContainerBorders = !! attributes.containerBorderType ||
// ( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
// !! attributes.containerShadow

// if ( ! attributes.hasContainer && hasContainerBorders ) {
// newAttributes = {
// ...newAttributes,
// hasContainer: true,
// containerPadding: {
// top: 0, right: 0, bottom: 0, left: 0,
// },
// containerBackgroundColor: 'transparent',
// }
// }

// If the inner blocks are horizontal, adjust to accomodate the new
// column gap, it will modify blocks because people used block
Expand Down
26 changes: 13 additions & 13 deletions src/block/countdown/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ const deprecated = [
// before, now it's not allowed. Turn on the container to mimic the
// effect. This goes first before the container paddings check below
// because we need to set the paddings to zero for this to work.
const hasContainerBorders = !! attributes.containerBorderType ||
( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
!! attributes.containerShadow
// const hasContainerBorders = !! attributes.containerBorderType ||
// ( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
// !! attributes.containerShadow

if ( ! attributes.hasContainer && hasContainerBorders ) {
newAttributes = {
...newAttributes,
hasContainer: true,
containerPadding: {
top: 0, right: 0, bottom: 0, left: 0,
},
containerBackgroundColor: 'transparent',
}
}
// if ( ! attributes.hasContainer && hasContainerBorders ) {
// newAttributes = {
// ...newAttributes,
// hasContainer: true,
// containerPadding: {
// top: 0, right: 0, bottom: 0, left: 0,
// },
// containerBackgroundColor: 'transparent',
// }
// }

newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes )
newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes )
Expand Down
28 changes: 14 additions & 14 deletions src/block/feature/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,20 @@ const deprecated = [
// before, now it's not allowed. Turn on the container to mimic the
// effect. This goes first before the container paddings check below
// because we need to set the paddings to zero for this to work.
const hasContainerBorders = !! attributes.containerBorderType ||
( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
!! attributes.containerShadow

if ( ! attributes.hasContainer && hasContainerBorders ) {
newAttributes = {
...newAttributes,
hasContainer: true,
containerPadding: {
top: 0, right: 0, bottom: 0, left: 0,
},
containerBackgroundColor: 'transparent',
}
}
// const hasContainerBorders = !! attributes.containerBorderType ||
// ( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
// !! attributes.containerShadow

// if ( ! attributes.hasContainer && hasContainerBorders ) {
// newAttributes = {
// ...newAttributes,
// hasContainer: true,
// containerPadding: {
// top: 0, right: 0, bottom: 0, left: 0,
// },
// containerBackgroundColor: 'transparent',
// }
// }

newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes )
newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes )
Expand Down
30 changes: 15 additions & 15 deletions src/block/hero/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,21 @@ const deprecated = [
// before, now it's not allowed. Turn on the container to mimic the
// effect. This goes first before the container paddings check below
// because we need to set the paddings to zero for this to work.
const hasContainerBorders = !! attributes.containerBorderType ||
( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
!! attributes.containerShadow

if ( ! attributes.hasContainer && hasContainerBorders ) {
newAttributes = {
...newAttributes,
hasContainer: true,
containerPadding: {
top: 0, right: 0, bottom: 0, left: 0,
},
containerBackgroundColorOpacity: 0,
// containerBackgroundColor: 'transparent',
}
}
// const hasContainerBorders = !! attributes.containerBorderType ||
// ( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
// !! attributes.containerShadow

// if ( ! attributes.hasContainer && hasContainerBorders ) {
// newAttributes = {
// ...newAttributes,
// hasContainer: true,
// containerPadding: {
// top: 0, right: 0, bottom: 0, left: 0,
// },
// containerBackgroundColorOpacity: 0,
// // containerBackgroundColor: 'transparent',
// }
// }

// If the inner blocks are horizontal, adjust to accomodate the new
// column gap, it will modify blocks because people used block
Expand Down
28 changes: 14 additions & 14 deletions src/block/icon-box/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ const deprecated = [
// before, now it's not allowed. Turn on the container to mimic the
// effect. This goes first before the container paddings check below
// because we need to set the paddings to zero for this to work.
const hasContainerBorders = !! attributes.containerBorderType ||
( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
!! attributes.containerShadow

if ( ! attributes.hasContainer && hasContainerBorders ) {
newAttributes = {
...newAttributes,
hasContainer: true,
containerPadding: {
top: 0, right: 0, bottom: 0, left: 0,
},
containerBackgroundColor: 'transparent',
}
}
// const hasContainerBorders = !! attributes.containerBorderType ||
// ( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
// !! attributes.containerShadow

// if ( ! attributes.hasContainer && hasContainerBorders ) {
// newAttributes = {
// ...newAttributes,
// hasContainer: true,
// containerPadding: {
// top: 0, right: 0, bottom: 0, left: 0,
// },
// containerBackgroundColor: 'transparent',
// }
// }

newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes )
newAttributes = deprecateBlockBackgroundColorOpacity.migrate( newAttributes )
Expand Down
28 changes: 14 additions & 14 deletions src/block/notification/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,20 @@ const deprecated = [
// before, now it's not allowed. Turn on the container to mimic the
// effect. This goes first before the container paddings check below
// because we need to set the paddings to zero for this to work.
const hasContainerBorders = !! attributes.containerBorderType ||
( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
!! attributes.containerShadow

if ( ! attributes.hasContainer && hasContainerBorders ) {
newAttributes = {
...newAttributes,
hasContainer: true,
containerPadding: {
top: 0, right: 0, bottom: 0, left: 0,
},
containerBackgroundColor: 'transparent',
}
}
// const hasContainerBorders = !! attributes.containerBorderType ||
// ( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
// !! attributes.containerShadow

// if ( ! attributes.hasContainer && hasContainerBorders ) {
// newAttributes = {
// ...newAttributes,
// hasContainer: true,
// containerPadding: {
// top: 0, right: 0, bottom: 0, left: 0,
// },
// containerBackgroundColor: 'transparent',
// }
// }

// If the inner blocks are horizontal, adjust to accomodate the new
// column gap, it will modify blocks because people used block
Expand Down
28 changes: 14 additions & 14 deletions src/block/posts/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,20 @@ const deprecated = [
// before, now it's not allowed. Turn on the container to mimic the
// effect. This goes first before the container paddings check below
// because we need to set the paddings to zero for this to work.
const hasContainerBorders = !! attributes.containerBorderType ||
( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
!! attributes.containerShadow

if ( ! attributes.hasContainer && hasContainerBorders ) {
newAttributes = {
...newAttributes,
hasContainer: true,
containerPadding: {
top: 0, right: 0, bottom: 0, left: 0,
},
containerBackgroundColor: 'transparent',
}
}
// const hasContainerBorders = !! attributes.containerBorderType ||
// ( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
// !! attributes.containerShadow

// if ( ! attributes.hasContainer && hasContainerBorders ) {
// newAttributes = {
// ...newAttributes,
// hasContainer: true,
// containerPadding: {
// top: 0, right: 0, bottom: 0, left: 0,
// },
// containerBackgroundColor: 'transparent',
// }
// }

newAttributes = deprecationImageOverlayOpacity.migrate( newAttributes )
newAttributes = deprecateContainerBackgroundColorOpacity.migrate( newAttributes )
Expand Down
28 changes: 14 additions & 14 deletions src/block/pricing-box/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,20 @@ const deprecated = [
// before, now it's not allowed. Turn on the container to mimic the
// effect. This goes first before the container paddings check below
// because we need to set the paddings to zero for this to work.
const hasContainerBorders = !! attributes.containerBorderType ||
( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
!! attributes.containerShadow

if ( ! attributes.hasContainer && hasContainerBorders ) {
newAttributes = {
...newAttributes,
hasContainer: true,
containerPadding: {
top: 0, right: 0, bottom: 0, left: 0,
},
containerBackgroundColor: 'transparent',
}
}
// const hasContainerBorders = !! attributes.containerBorderType ||
// ( typeof attributes.containerBorderRadius !== 'undefined' && attributes.containerBorderRadius !== '' ) ||
// !! attributes.containerShadow

// if ( ! attributes.hasContainer && hasContainerBorders ) {
// newAttributes = {
// ...newAttributes,
// hasContainer: true,
// containerPadding: {
// top: 0, right: 0, bottom: 0, left: 0,
// },
// containerBackgroundColor: 'transparent',
// }
// }

// If the inner blocks are horizontal, adjust to accomodate the new
// column gap, it will modify blocks because people used block
Expand Down
Loading

0 comments on commit f2ba2a4

Please sign in to comment.