Skip to content

Commit

Permalink
prep build 07/15
Browse files Browse the repository at this point in the history
  • Loading branch information
bph committed Jul 16, 2024
2 parents d3c288b + e64a666 commit d4f7785
Show file tree
Hide file tree
Showing 119 changed files with 1,779 additions and 604 deletions.
3 changes: 3 additions & 0 deletions backport-changelog/6.6/7036.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://github.com/WordPress/wordpress-develop/pull/7036

* https://github.com/WordPress/gutenberg/pull/63436
3 changes: 3 additions & 0 deletions backport-changelog/6.7/6991.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://github.com/WordPress/wordpress-develop/pull/6991

* https://github.com/WordPress/gutenberg/pull/61382
23 changes: 23 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
== Changelog ==

= 18.8.0-rc.3 =


## Changelog

### Bug Fixes

#### Layout
- Fix invalid css for nested fullwidth layouts with zero padding applied. ([63436](https://github.com/WordPress/gutenberg/pull/63436))

#### Typography
- Font Appearance Control: Refactor font appearance fallbacks. ([63215](https://github.com/WordPress/gutenberg/pull/63215))




## Contributors

The following contributors merged PRs in this release:

@mikachan @richtabor


= 18.8.0-rc.2 =


Expand Down
6 changes: 3 additions & 3 deletions docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Prompt visitors to take action with a group of button-style links. ([Source](htt
- **Name:** core/buttons
- **Category:** design
- **Allowed Blocks:** core/button
- **Supports:** align (full, wide), anchor, interactivity (clientNavigation), layout (default, ~~allowInheriting~~, ~~allowSwitching~~), spacing (blockGap, margin), typography (fontSize, lineHeight), ~~html~~
- **Supports:** align (full, wide), anchor, color (background, gradients, ~~text~~), interactivity (clientNavigation), layout (default, ~~allowInheriting~~, ~~allowSwitching~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~

## Calendar

Expand All @@ -79,7 +79,7 @@ Display a list of all categories. ([Source](https://github.com/WordPress/gutenbe
- **Name:** core/categories
- **Category:** widgets
- **Supports:** align, interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** displayAsDropdown, showEmpty, showHierarchy, showOnlyTopLevel, showPostCounts
- **Attributes:** displayAsDropdown, label, showEmpty, showHierarchy, showLabel, showOnlyTopLevel, showPostCounts

## Code

Expand Down Expand Up @@ -783,7 +783,7 @@ Give quoted text visual emphasis. "In quoting others, we cite ourselves." — Ju

- **Name:** core/quote
- **Category:** text
- **Supports:** anchor, background (backgroundImage, backgroundSize), color (background, gradients, heading, link, text), dimensions (minHeight), interactivity (clientNavigation), layout (~~allowEditing~~), spacing (blockGap), typography (fontSize, lineHeight), ~~html~~
- **Supports:** anchor, background (backgroundImage, backgroundSize), color (background, gradients, heading, link, text), dimensions (minHeight), interactivity (clientNavigation), layout (~~allowEditing~~), spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** citation, textAlign, value

## Read More
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ Background styles.
| backgroundPosition | string, object | |
| backgroundRepeat | string, object | |
| backgroundSize | string, object | |
| backgroundAttachment | string, object | |

---

Expand Down
12 changes: 6 additions & 6 deletions lib/block-supports/background.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ function gutenberg_render_background_support( $block_content, $block ) {
return $block_content;
}

$background_styles = array();
$background_styles['backgroundImage'] = $block_attributes['style']['background']['backgroundImage'] ?? null;
$background_styles['backgroundSize'] = $block_attributes['style']['background']['backgroundSize'] ?? null;
$background_styles['backgroundPosition'] = $block_attributes['style']['background']['backgroundPosition'] ?? null;
$background_styles['backgroundRepeat'] = $block_attributes['style']['background']['backgroundRepeat'] ?? null;

$background_styles = array();
$background_styles['backgroundImage'] = $block_attributes['style']['background']['backgroundImage'] ?? null;
$background_styles['backgroundSize'] = $block_attributes['style']['background']['backgroundSize'] ?? null;
$background_styles['backgroundPosition'] = $block_attributes['style']['background']['backgroundPosition'] ?? null;
$background_styles['backgroundRepeat'] = $block_attributes['style']['background']['backgroundRepeat'] ?? null;
$background_styles['backgroundAttachment'] = $block_attributes['style']['background']['backgroundAttachment'] ?? null;
if ( ! empty( $background_styles['backgroundImage'] ) ) {
$background_styles['backgroundSize'] = $background_styles['backgroundSize'] ?? 'cover';
// If the background size is set to `contain` and no position is set, set the position to `center`.
Expand Down
12 changes: 10 additions & 2 deletions lib/block-supports/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,22 @@ function gutenberg_get_layout_style( $selector, $layout, $has_block_gap_support
* They're added separately because padding might only be set on one side.
*/
if ( isset( $block_spacing_values['declarations']['padding-right'] ) ) {
$padding_right = $block_spacing_values['declarations']['padding-right'];
$padding_right = $block_spacing_values['declarations']['padding-right'];
// Add unit if 0.
if ( '0' === $padding_right ) {
$padding_right = '0px';
}
$layout_styles[] = array(
'selector' => "$selector > .alignfull",
'declarations' => array( 'margin-right' => "calc($padding_right * -1)" ),
);
}
if ( isset( $block_spacing_values['declarations']['padding-left'] ) ) {
$padding_left = $block_spacing_values['declarations']['padding-left'];
$padding_left = $block_spacing_values['declarations']['padding-left'];
// Add unit if 0.
if ( '0' === $padding_left ) {
$padding_left = '0px';
}
$layout_styles[] = array(
'selector' => "$selector > .alignfull",
'declarations' => array( 'margin-left' => "calc($padding_left * -1)" ),
Expand Down
10 changes: 6 additions & 4 deletions lib/class-wp-theme-json-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ class WP_Theme_JSON_Gutenberg {
'background-position' => array( 'background', 'backgroundPosition' ),
'background-repeat' => array( 'background', 'backgroundRepeat' ),
'background-size' => array( 'background', 'backgroundSize' ),
'background-attachment' => array( 'background', 'backgroundAttachment' ),
'border-radius' => array( 'border', 'radius' ),
'border-top-left-radius' => array( 'border', 'radius', 'topLeft' ),
'border-top-right-radius' => array( 'border', 'radius', 'topRight' ),
Expand Down Expand Up @@ -503,10 +504,11 @@ class WP_Theme_JSON_Gutenberg {
*/
const VALID_STYLES = array(
'background' => array(
'backgroundImage' => null,
'backgroundPosition' => null,
'backgroundRepeat' => null,
'backgroundSize' => null,
'backgroundImage' => null,
'backgroundAttachment' => null,
'backgroundPosition' => null,
'backgroundRepeat' => null,
'backgroundSize' => null,
),
'border' => array(
'color' => null,
Expand Down
58 changes: 29 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gutenberg",
"version": "18.8.0-rc.2",
"version": "18.8.0-rc.3",
"private": true,
"description": "A new WordPress editor experience.",
"author": "The WordPress Contributors",
Expand Down Expand Up @@ -110,7 +110,7 @@
"@octokit/rest": "16.26.0",
"@octokit/types": "6.34.0",
"@octokit/webhooks-types": "5.8.0",
"@playwright/test": "1.43.0",
"@playwright/test": "1.45.1",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.11",
"@react-native/babel-preset": "0.73.10",
"@react-native/metro-babel-transformer": "0.73.10",
Expand Down Expand Up @@ -303,7 +303,7 @@
"lint:pkg-json": "wp-scripts lint-pkg-json . 'packages/*/package.json'",
"native": "npm run --prefix packages/react-native-editor",
"other:changelog": "node ./bin/plugin/cli.js changelog",
"other:check-licenses": "concurrently \"wp-scripts check-licenses --prod --gpl2 --ignore=@react-native-community/cli,@react-native-community/cli-platform-ios\" \"wp-scripts check-licenses --dev\"",
"other:check-licenses": "concurrently \"wp-scripts check-licenses --prod --gpl2 --ignore=@react-native-community/cli,@react-native-community/cli-platform-ios,@ampproject/remapping,human-signals,fb-watchman,bser,walker,chrome-launcher,lighthouse-logger,chromium-edge-launcher\" \"wp-scripts check-licenses --dev --ignore=jackspeak,path-scurry,package-json-from-dist\"",
"preother:check-local-changes": "npm run docs:build",
"other:check-local-changes": "node ./bin/check-local-changes.js",
"other:cherry-pick": "node ./bin/cherry-pick.mjs",
Expand Down
12 changes: 8 additions & 4 deletions packages/block-editor/src/components/block-inspector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {
label={ __( 'Color' ) }
className="color-block-support-panel__inner-wrapper"
/>
<InspectorControls.Slot
group="background"
label={ __( 'Background image' ) }
/>
<InspectorControls.Slot
group="typography"
label={ __( 'Typography' ) }
Expand Down Expand Up @@ -285,6 +289,10 @@ const BlockInspectorSingleBlock = ( { clientId, blockName } ) => {
label={ __( 'Color' ) }
className="color-block-support-panel__inner-wrapper"
/>
<InspectorControls.Slot
group="background"
label={ __( 'Background image' ) }
/>
<InspectorControls.Slot
group="typography"
label={ __( 'Typography' ) }
Expand All @@ -298,10 +306,6 @@ const BlockInspectorSingleBlock = ( { clientId, blockName } ) => {
label={ borderPanelLabel }
/>
<InspectorControls.Slot group="styles" />
<InspectorControls.Slot
group="background"
label={ __( 'Background image' ) }
/>
<PositionControls />
<div>
<AdvancedControls />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __ } from '@wordpress/i18n';
import { useState } from '@wordpress/element';
import { useInstanceId } from '@wordpress/compose';
import { useInstanceId, useViewportMatch } from '@wordpress/compose';
import { chevronRight } from '@wordpress/icons';

import {
Expand Down Expand Up @@ -34,6 +34,7 @@ function PatternTransformationsMenu( {
} ) {
const [ showTransforms, setShowTransforms ] = useState( false );
const patterns = useTransformedPatterns( statePatterns, blocks );

if ( ! patterns.length ) {
return null;
}
Expand All @@ -60,21 +61,22 @@ function PatternTransformationsMenu( {
}

function PreviewPatternsPopover( { patterns, onSelect } ) {
const isMobile = useViewportMatch( 'medium', '<' );

return (
<div className="block-editor-block-switcher__popover__preview__parent">
<div className="block-editor-block-switcher__popover__preview__container">
<Popover
className="block-editor-block-switcher__preview__popover"
position="bottom right"
>
<div className="block-editor-block-switcher__preview is-pattern-list-preview">
<BlockPatternsList
patterns={ patterns }
onSelect={ onSelect }
/>
</div>
</Popover>
</div>
<div className="block-editor-block-switcher__popover-preview-container">
<Popover
className="block-editor-block-switcher__popover-preview"
placement={ isMobile ? 'bottom' : 'right-start' }
offset={ 16 }
>
<div className="block-editor-block-switcher__preview is-pattern-list-preview">
<BlockPatternsList
patterns={ patterns }
onSelect={ onSelect }
/>
</div>
</Popover>
</div>
);
}
Expand Down
Loading

0 comments on commit d4f7785

Please sign in to comment.