From a99840e96069052ee28b67ec40cdcecabad2c329 Mon Sep 17 00:00:00 2001 From: brookewp Date: Fri, 18 Nov 2022 18:38:53 -0800 Subject: [PATCH 1/5] RangeControl: Add new opt-in margin bottom prop --- .../src/components/image-editor/zoom-dropdown.js | 1 + .../spacing-sizes-control/spacing-input-control.js | 1 + packages/block-library/src/avatar/edit.js | 1 + packages/block-library/src/columns/edit.js | 1 + .../src/cover/edit/inspector-controls.js | 1 + packages/block-library/src/file/inspector.js | 1 + packages/block-library/src/gallery/edit.js | 1 + packages/block-library/src/image/editor.scss | 11 ----------- packages/block-library/src/latest-comments/edit.js | 1 + packages/block-library/src/latest-posts/edit.js | 2 ++ packages/block-library/src/media-text/edit.js | 1 + .../block-library/src/post-featured-image/overlay.js | 1 + .../src/query/edit/inspector-controls/index.js | 1 + packages/block-library/src/rss/edit.js | 3 +++ packages/block-library/src/site-logo/edit.js | 1 + packages/block-library/src/tag-cloud/edit.js | 1 + packages/components/src/query-controls/index.js | 1 + 17 files changed, 19 insertions(+), 11 deletions(-) diff --git a/packages/block-editor/src/components/image-editor/zoom-dropdown.js b/packages/block-editor/src/components/image-editor/zoom-dropdown.js index 2694382e3860c2..70baa28b2e112c 100644 --- a/packages/block-editor/src/components/image-editor/zoom-dropdown.js +++ b/packages/block-editor/src/components/image-editor/zoom-dropdown.js @@ -28,6 +28,7 @@ export default function ZoomDropdown() { ) } renderContent={ () => ( ) } diff --git a/packages/block-library/src/avatar/edit.js b/packages/block-library/src/avatar/edit.js index 7df772677ebb7d..2741b7adcd3dae 100644 --- a/packages/block-library/src/avatar/edit.js +++ b/packages/block-library/src/avatar/edit.js @@ -35,6 +35,7 @@ const AvatarInspectorControls = ( { setAttributes( { diff --git a/packages/block-library/src/columns/edit.js b/packages/block-library/src/columns/edit.js index 8879f0e52f2e7a..b978c411107d5e 100644 --- a/packages/block-library/src/columns/edit.js +++ b/packages/block-library/src/columns/edit.js @@ -95,6 +95,7 @@ function ColumnsEditContainer( { updateColumns( count, value ) } diff --git a/packages/block-library/src/cover/edit/inspector-controls.js b/packages/block-library/src/cover/edit/inspector-controls.js index 98747988c8f409..d3f65672e09328 100644 --- a/packages/block-library/src/cover/edit/inspector-controls.js +++ b/packages/block-library/src/cover/edit/inspector-controls.js @@ -266,6 +266,7 @@ export default function CoverInspectorControls( { panelId={ clientId } > diff --git a/packages/block-library/src/file/inspector.js b/packages/block-library/src/file/inspector.js index 121f5e0473e767..71e0885eae1c6b 100644 --- a/packages/block-library/src/file/inspector.js +++ b/packages/block-library/src/file/inspector.js @@ -56,6 +56,7 @@ export default function FileBlockInspector( { /> { displayPreview && ( { images.length > 1 && ( diff --git a/packages/block-library/src/latest-posts/edit.js b/packages/block-library/src/latest-posts/edit.js index 3671ec555e600c..45ffe1338aaabf 100644 --- a/packages/block-library/src/latest-posts/edit.js +++ b/packages/block-library/src/latest-posts/edit.js @@ -234,6 +234,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) { { displayPostContent && displayPostContentRadio === 'excerpt' && ( @@ -355,6 +356,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) { { postLayout === 'grid' && ( diff --git a/packages/block-library/src/media-text/edit.js b/packages/block-library/src/media-text/edit.js index c336aab558ac61..b85249f3a74b27 100644 --- a/packages/block-library/src/media-text/edit.js +++ b/packages/block-library/src/media-text/edit.js @@ -307,6 +307,7 @@ function MediaTextEdit( { attributes, isSelected, setAttributes, clientId } ) { ) } { mediaUrl && ( diff --git a/packages/block-library/src/query/edit/inspector-controls/index.js b/packages/block-library/src/query/edit/inspector-controls/index.js index ffe19060682d3f..13cc70e9dc5428 100644 --- a/packages/block-library/src/query/edit/inspector-controls/index.js +++ b/packages/block-library/src/query/edit/inspector-controls/index.js @@ -141,6 +141,7 @@ export default function QueryInspectorControls( { { showColumnsControl && ( <> diff --git a/packages/block-library/src/rss/edit.js b/packages/block-library/src/rss/edit.js index f72bf1c77e6741..f7689b8c38ca1c 100644 --- a/packages/block-library/src/rss/edit.js +++ b/packages/block-library/src/rss/edit.js @@ -111,6 +111,7 @@ export default function RSSEdit( { attributes, setAttributes } ) { @@ -137,6 +138,7 @@ export default function RSSEdit( { attributes, setAttributes } ) { /> { displayExcerpt && ( @@ -149,6 +151,7 @@ export default function RSSEdit( { attributes, setAttributes } ) { ) } { blockLayout === 'grid' && ( diff --git a/packages/block-library/src/site-logo/edit.js b/packages/block-library/src/site-logo/edit.js index 0d752a5dbae31f..6abf3701e17cad 100644 --- a/packages/block-library/src/site-logo/edit.js +++ b/packages/block-library/src/site-logo/edit.js @@ -298,6 +298,7 @@ const SiteLogo = ( { setAttributes( { width: newWidth } ) diff --git a/packages/block-library/src/tag-cloud/edit.js b/packages/block-library/src/tag-cloud/edit.js index df4824cb0e35ec..dd669a7e840b3f 100644 --- a/packages/block-library/src/tag-cloud/edit.js +++ b/packages/block-library/src/tag-cloud/edit.js @@ -124,6 +124,7 @@ function TagCloudEdit( { attributes, setAttributes, taxonomies } ) { } /> diff --git a/packages/components/src/query-controls/index.js b/packages/components/src/query-controls/index.js index 04c225a7691dda..e62d71eb2d8eb1 100644 --- a/packages/components/src/query-controls/index.js +++ b/packages/components/src/query-controls/index.js @@ -107,6 +107,7 @@ export default function QueryControls( { ), onNumberOfItemsChange && ( Date: Tue, 22 Nov 2022 17:35:09 -0800 Subject: [PATCH 2/5] Add prop to deprecated blocks --- packages/block-library/src/comment-author-avatar/edit.js | 1 + packages/block-library/src/text-columns/edit.js | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/block-library/src/comment-author-avatar/edit.js b/packages/block-library/src/comment-author-avatar/edit.js index 6bc4651af4307d..9abc9021807f4f 100644 --- a/packages/block-library/src/comment-author-avatar/edit.js +++ b/packages/block-library/src/comment-author-avatar/edit.js @@ -50,6 +50,7 @@ export default function Edit( { setAttributes( { diff --git a/packages/block-library/src/text-columns/edit.js b/packages/block-library/src/text-columns/edit.js index 180c786226c803..993e5da0c80e39 100644 --- a/packages/block-library/src/text-columns/edit.js +++ b/packages/block-library/src/text-columns/edit.js @@ -39,6 +39,7 @@ export default function TextColumnsEdit( { attributes, setAttributes } ) { From 0b2a766c893fb78c64acd6ddeca14b9f38ea6cb4 Mon Sep 17 00:00:00 2001 From: brookewp Date: Tue, 22 Nov 2022 17:36:01 -0800 Subject: [PATCH 3/5] Add prop to gallery v1 block --- packages/block-library/src/gallery/v1/edit.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/block-library/src/gallery/v1/edit.js b/packages/block-library/src/gallery/v1/edit.js index 58d9011ee1fa7c..e79760a544cd2c 100644 --- a/packages/block-library/src/gallery/v1/edit.js +++ b/packages/block-library/src/gallery/v1/edit.js @@ -403,6 +403,7 @@ function GalleryEdit( props ) { { images.length > 1 && ( Date: Tue, 29 Nov 2022 18:12:22 -0800 Subject: [PATCH 4/5] remove additional margin overrides and add prop to components based on PR feedback --- changelog.txt | 1 + .../src/border-control/border-control/component.tsx | 1 + packages/components/src/border-control/styles.ts | 11 +---------- .../components/src/color-picker/input-with-slider.tsx | 1 + packages/components/src/color-picker/styles.ts | 4 ---- 5 files changed, 4 insertions(+), 14 deletions(-) diff --git a/changelog.txt b/changelog.txt index 3a8c82ca84c2c8..8e7f596b071d63 100644 --- a/changelog.txt +++ b/changelog.txt @@ -47,6 +47,7 @@ The following contributors merged PRs in this release: - FocalPointPicker: Update the design of the focal point handle. ([45053](https://github.com/WordPress/gutenberg/pull/45053)) - FontSizePicker: Update hint text to match the design. ([44966](https://github.com/WordPress/gutenberg/pull/44966)) - CheckboxControl: Move icons out of labels. ([45535](https://github.com/WordPress/gutenberg/pull/45535)) +- RangeControl: remove margin overrides and add new opt-in prop. ([45985](https://github.com/WordPress/gutenberg/pull/45985)) #### Block Editor diff --git a/packages/components/src/border-control/border-control/component.tsx b/packages/components/src/border-control/border-control/component.tsx index 942adc4e95b477..0350ceaff6e7b2 100644 --- a/packages/components/src/border-control/border-control/component.tsx +++ b/packages/components/src/border-control/border-control/component.tsx @@ -104,6 +104,7 @@ const UnconnectedBorderControl = ( /> { withSlider && ( css` flex: 1 1 60%; ${ rtl( { marginRight: space( 3 ) } )() } - - ${ StyledField } { - margin-bottom: 0; - font-size: 0; - display: flex; - } `; diff --git a/packages/components/src/color-picker/input-with-slider.tsx b/packages/components/src/color-picker/input-with-slider.tsx index be09e789d7902e..f28c7307c07727 100644 --- a/packages/components/src/color-picker/input-with-slider.tsx +++ b/packages/components/src/color-picker/input-with-slider.tsx @@ -60,6 +60,7 @@ export const InputWithSlider = ( { size="__unstable-large" /> Date: Tue, 29 Nov 2022 23:03:28 -0800 Subject: [PATCH 5/5] move changelog entry to correct changelog --- changelog.txt | 1 - packages/components/CHANGELOG.md | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 8e7f596b071d63..3a8c82ca84c2c8 100644 --- a/changelog.txt +++ b/changelog.txt @@ -47,7 +47,6 @@ The following contributors merged PRs in this release: - FocalPointPicker: Update the design of the focal point handle. ([45053](https://github.com/WordPress/gutenberg/pull/45053)) - FontSizePicker: Update hint text to match the design. ([44966](https://github.com/WordPress/gutenberg/pull/44966)) - CheckboxControl: Move icons out of labels. ([45535](https://github.com/WordPress/gutenberg/pull/45535)) -- RangeControl: remove margin overrides and add new opt-in prop. ([45985](https://github.com/WordPress/gutenberg/pull/45985)) #### Block Editor diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index cee4723a7e792e..c049f17caac3a5 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -14,6 +14,7 @@ - `TabPanel`: Add ability to set icon only tab buttons ([#45005](https://github.com/WordPress/gutenberg/pull/45005)). - `InputControl`, `NumberControl`, `UnitControl`: Add `help` prop for additional description ([#45931](https://github.com/WordPress/gutenberg/pull/45931)). +- `BorderControl`, `ColorPicker` & `QueryControls`: Replace bottom margin overrides with `__nextHasNoMarginBottom` ([#45985](https://github.com/WordPress/gutenberg/pull/45985)). ### Experimental