Skip to content

Commit db9b1ea

Browse files
committed
prep build 10/30
2 parents 95ee450 + 49a9318 commit db9b1ea

File tree

57 files changed

+843
-1001
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+843
-1001
lines changed

lib/class-wp-theme-json-gutenberg.php

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -745,10 +745,10 @@ public function __construct( $theme_json = array( 'version' => WP_Theme_JSON_Gut
745745
}
746746

747747
$this->theme_json = WP_Theme_JSON_Schema_Gutenberg::migrate( $theme_json, $origin );
748-
$registry = WP_Block_Type_Registry::get_instance();
749-
$valid_block_names = array_keys( $registry->get_all_registered() );
748+
$blocks_metadata = static::get_blocks_metadata();
749+
$valid_block_names = array_keys( $blocks_metadata );
750750
$valid_element_names = array_keys( static::ELEMENTS );
751-
$valid_variations = static::get_valid_block_style_variations();
751+
$valid_variations = static::get_valid_block_style_variations( $blocks_metadata );
752752
$this->theme_json = static::unwrap_shared_block_style_variations( $this->theme_json, $valid_variations );
753753
$this->theme_json = static::sanitize( $this->theme_json, $valid_block_names, $valid_element_names, $valid_variations );
754754
$this->theme_json = static::maybe_opt_in_into_settings( $this->theme_json );
@@ -3506,9 +3506,10 @@ public static function remove_insecure_properties( $theme_json, $origin = 'theme
35063506

35073507
$theme_json = WP_Theme_JSON_Schema_Gutenberg::migrate( $theme_json, $origin );
35083508

3509-
$valid_block_names = array_keys( static::get_blocks_metadata() );
3509+
$blocks_metadata = static::get_blocks_metadata();
3510+
$valid_block_names = array_keys( $blocks_metadata );
35103511
$valid_element_names = array_keys( static::ELEMENTS );
3511-
$valid_variations = static::get_valid_block_style_variations();
3512+
$valid_variations = static::get_valid_block_style_variations( $blocks_metadata );
35123513

35133514
$theme_json = static::sanitize( $theme_json, $valid_block_names, $valid_element_names, $valid_variations );
35143515

@@ -4511,11 +4512,16 @@ function ( $matches ) use ( $variation_class ) {
45114512
/**
45124513
* Collects valid block style variations keyed by block type.
45134514
*
4515+
* @since 6.6.0
4516+
* @since 6.8.0 Added the `$blocks_metadata` parameter.
4517+
*
4518+
* @param array $blocks_metadata Optional. List of metadata per block. Default is the metadata for all blocks.
45144519
* @return array Valid block style variations by block type.
45154520
*/
4516-
protected static function get_valid_block_style_variations() {
4521+
protected static function get_valid_block_style_variations( $blocks_metadata = array() ) {
45174522
$valid_variations = array();
4518-
foreach ( self::get_blocks_metadata() as $block_name => $block_meta ) {
4523+
$blocks_metadata = empty( $blocks_metadata ) ? static::get_blocks_metadata() : $blocks_metadata;
4524+
foreach ( $blocks_metadata as $block_name => $block_meta ) {
45194525
if ( ! isset( $block_meta['styleVariations'] ) ) {
45204526
continue;
45214527
}

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/block-editor/src/components/block-full-height-alignment-control/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { fullscreen } from '@wordpress/icons';
77

88
function BlockFullHeightAlignmentControl( {
99
isActive,
10-
label = __( 'Toggle full height' ),
10+
label = __( 'Full height' ),
1111
onToggle,
1212
isDisabled,
1313
} ) {

packages/block-editor/src/hooks/block-bindings.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import { useBlockEditContext } from '../components/block-edit';
3434
import { useBlockBindingsUtils } from '../utils/block-bindings';
3535
import { store as blockEditorStore } from '../store';
3636

37-
const { DropdownMenuV2 } = unlock( componentsPrivateApis );
37+
const { Menu } = unlock( componentsPrivateApis );
3838

3939
const EMPTY_OBJECT = {};
4040

@@ -70,18 +70,18 @@ function BlockBindingsPanelDropdown( { fieldsList, attribute, binding } ) {
7070
<>
7171
{ Object.entries( fieldsList ).map( ( [ name, fields ], i ) => (
7272
<Fragment key={ name }>
73-
<DropdownMenuV2.Group>
73+
<Menu.Group>
7474
{ Object.keys( fieldsList ).length > 1 && (
75-
<DropdownMenuV2.GroupLabel>
75+
<Menu.GroupLabel>
7676
{ registeredSources[ name ].label }
77-
</DropdownMenuV2.GroupLabel>
77+
</Menu.GroupLabel>
7878
) }
7979
{ Object.entries( fields )
8080
.filter(
8181
( [ , args ] ) => args?.type === attributeType
8282
)
8383
.map( ( [ key, args ] ) => (
84-
<DropdownMenuV2.RadioItem
84+
<Menu.RadioItem
8585
key={ key }
8686
onChange={ () =>
8787
updateBlockBindings( {
@@ -95,17 +95,17 @@ function BlockBindingsPanelDropdown( { fieldsList, attribute, binding } ) {
9595
value={ key }
9696
checked={ key === currentKey }
9797
>
98-
<DropdownMenuV2.ItemLabel>
98+
<Menu.ItemLabel>
9999
{ args?.label }
100-
</DropdownMenuV2.ItemLabel>
101-
<DropdownMenuV2.ItemHelpText>
100+
</Menu.ItemLabel>
101+
<Menu.ItemHelpText>
102102
{ args?.value }
103-
</DropdownMenuV2.ItemHelpText>
104-
</DropdownMenuV2.RadioItem>
103+
</Menu.ItemHelpText>
104+
</Menu.RadioItem>
105105
) ) }
106-
</DropdownMenuV2.Group>
106+
</Menu.Group>
107107
{ i !== Object.keys( fieldsList ).length - 1 && (
108-
<DropdownMenuV2.Separator />
108+
<Menu.Separator />
109109
) }
110110
</Fragment>
111111
) ) }
@@ -175,7 +175,7 @@ function EditableBlockBindingsPanelItems( {
175175
} );
176176
} }
177177
>
178-
<DropdownMenuV2
178+
<Menu
179179
placement={
180180
isMobile ? 'bottom-start' : 'left-start'
181181
}
@@ -195,7 +195,7 @@ function EditableBlockBindingsPanelItems( {
195195
attribute={ attribute }
196196
binding={ binding }
197197
/>
198-
</DropdownMenuV2>
198+
</Menu>
199199
</ToolsPanelItem>
200200
);
201201
} ) }

packages/block-library/src/cover/test/edit.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,7 @@ describe( 'Cover block', () => {
119119
'min-height: 100vh;'
120120
);
121121

122-
await userEvent.click(
123-
screen.getByLabelText( 'Toggle full height' )
124-
);
122+
await userEvent.click( screen.getByLabelText( 'Full height' ) );
125123

126124
expect( screen.getByLabelText( 'Block: Cover' ) ).toHaveStyle(
127125
'min-height: 100vh;'

packages/block-library/src/paragraph/edit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function DropCapControl( { clientId, attributes, setAttributes } ) {
6666
} else if ( dropCap ) {
6767
helpText = __( 'Showing large initial letter.' );
6868
} else {
69-
helpText = __( 'Toggle to show a large initial letter.' );
69+
helpText = __( 'Show a large initial letter.' );
7070
}
7171

7272
return (

packages/block-library/src/search/edit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ export default function SearchEdit( {
376376
<BlockControls>
377377
<ToolbarGroup>
378378
<ToolbarButton
379-
title={ __( 'Toggle search label' ) }
379+
title={ __( 'Show search label' ) }
380380
icon={ toggleLabel }
381381
onClick={ () => {
382382
setAttributes( {

packages/components/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@
2626
- `Tabs`: update indicator more reactively ([#66207](https://github.com/WordPress/gutenberg/pull/66207)).
2727
- `Tabs` and `TabPanel`: Fix arrow key navigation in RTL ([#66201](https://github.com/WordPress/gutenberg/pull/66201)).
2828
- `Tabs`: override tablist's tabindex only when necessary ([#66209](https://github.com/WordPress/gutenberg/pull/66209)).
29+
- `DropdownMenuV2`: rename to `Menu` ([#66289](https://github.com/WordPress/gutenberg/pull/66289)).
2930

3031
### Internal
3132

3233
- ESLint: Stop disabling `react-hooks/exhaustive-deps` rule ([#66324](https://github.com/WordPress/gutenberg/pull/66324)).
34+
- `TabPanel`: Add 40px size prop to tab Button ([#66557](https://github.com/WordPress/gutenberg/pull/66557)).
3335

3436
## 28.10.0 (2024-10-16)
3537

0 commit comments

Comments
 (0)