Skip to content

Commit

Permalink
prep build 11/14
Browse files Browse the repository at this point in the history
  • Loading branch information
bph committed Nov 14, 2024
2 parents 9568d92 + e7f0dc5 commit 6302cbf
Show file tree
Hide file tree
Showing 73 changed files with 906 additions and 503 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rnmobile-android-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Use desired version of Java
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with:
distribution: 'corretto'
java-version: '17'
Expand All @@ -47,7 +47,7 @@ jobs:
run: npm run native test:e2e:setup

- name: Gradle cache
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # v4.2.0

# AVD cache disabled as it caused emulator termination to hang indefinitely.
# https://github.com/ReactiveCircus/android-emulator-runner/issues/385
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rnmobile-ios-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- uses: ruby/setup-ruby@7bae1d00b5db9166f4f0fc47985a3a5702cb58f0 # v1.197.0
- uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0
with:
# `.ruby-version` file location
working-directory: packages/react-native-editor/ios
Expand Down
3 changes: 3 additions & 0 deletions backport-changelog/6.8/7784.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://github.com/WordPress/wordpress-develop/pull/7784

* https://github.com/WordPress/gutenberg/pull/66948
300 changes: 300 additions & 0 deletions changelog.txt

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions docs/reference-guides/data/data-core-edit-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ _Returns_

### getEditedPostId

> **Deprecated**
Returns the ID of the currently edited template or template part.

_Parameters_
Expand All @@ -64,6 +66,8 @@ _Returns_

### getEditedPostType

> **Deprecated**
Returns the current edited post type (wp_template or wp_template_part).

_Parameters_
Expand Down Expand Up @@ -189,6 +193,8 @@ _Returns_
### isPage

> **Deprecated**
Whether or not the editor has a page loaded into it.

_Related_
Expand Down Expand Up @@ -273,6 +279,8 @@ _Parameters_

### setEditedEntity

> **Deprecated**
Action that sets an edited entity.

_Parameters_
Expand All @@ -287,6 +295,8 @@ _Returns_

### setEditedPostContext

> **Deprecated**
Set's the current block editor context.

_Parameters_
Expand Down Expand Up @@ -345,6 +355,8 @@ _Parameters_

### setNavigationMenu

> **Deprecated**
Action that sets a navigation menu.

_Parameters_
Expand Down Expand Up @@ -385,6 +397,8 @@ _Returns_

### setTemplatePart

> **Deprecated**
Action that sets a template part.

_Parameters_
Expand Down
14 changes: 13 additions & 1 deletion lib/class-wp-theme-json-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -2749,9 +2749,21 @@ private static function get_block_nodes( $theme_json, $selectors = array(), $opt
foreach ( $theme_json['styles']['blocks'] as $name => $node ) {
$node_path = array( 'styles', 'blocks', $name );
if ( $include_node_paths_only ) {
$nodes[] = array(
$variation_paths = array();
if ( $include_variations && isset( $node['variations'] ) ) {
foreach ( $node['variations'] as $variation => $variation_node ) {
$variation_paths[] = array(
'path' => array( 'styles', 'blocks', $name, 'variations', $variation ),
);
}
}
$node = array(
'path' => $node_path,
);
if ( ! empty( $variation_paths ) ) {
$node['variations'] = $variation_paths;
}
$nodes[] = $node;
} else {
$selector = null;
if ( isset( $selectors[ $name ]['selector'] ) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
class Gutenberg_REST_Comment_Controller_6_8 extends WP_REST_Comments_Controller {

public function create_item_permissions_check( $request ) {
if ( empty( $request['comment_type'] ) || 'comment' === $request['comment_type'] ) {
return parent::create_item_permissions_check( $request );
}

if ( ! is_user_logged_in() ) {
if ( get_option( 'comment_registration' ) ) {
return new WP_Error(
Expand Down Expand Up @@ -90,14 +94,6 @@ public function create_item_permissions_check( $request ) {
);
}

if ( 'draft' === $post->post_status && 'comment' === $request['comment_type'] ) {
return new WP_Error(
'rest_comment_draft_post',
__( 'Sorry, you are not allowed to create a comment on this post.' ),
array( 'status' => 403 )
);
}

if ( 'trash' === $post->post_status ) {
return new WP_Error(
'rest_comment_trash_post',
Expand All @@ -114,14 +110,6 @@ public function create_item_permissions_check( $request ) {
);
}

if ( ! comments_open( $post->ID ) && 'comment' === $request['comment_type'] ) {
return new WP_Error(
'rest_comment_closed',
__( 'Sorry, comments are closed for this item.' ),
array( 'status' => 403 )
);
}

return true;
}
}
Expand Down
19 changes: 9 additions & 10 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gutenberg",
"version": "19.6.1",
"version": "19.7.0-rc.2",
"private": true,
"description": "A new WordPress editor experience.",
"author": "The WordPress Contributors",
Expand Down Expand Up @@ -144,7 +144,7 @@
"react-scanner": "1.2.0",
"react-test-renderer": "18.3.1",
"reassure": "0.7.1",
"redux": "4.1.2",
"redux": "5.0.1",
"resize-observer-polyfill": "1.5.1",
"rimraf": "3.0.2",
"rtlcss": "4.0.0",
Expand Down
9 changes: 8 additions & 1 deletion packages/block-editor/src/components/rich-text/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,14 @@ export function RichTextWrapper(
bindingsLabel: _bindingsLabel,
};
},
[ blockBindings, identifier, blockName, blockContext, adjustedValue ]
[
blockBindings,
identifier,
blockName,
adjustedValue,
clientId,
blockContext,
]
);

const shouldDisableEditing = readOnly || disableBoundBlock;
Expand Down
4 changes: 4 additions & 0 deletions packages/block-library/src/navigation/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,10 @@ private static function get_navigation_name( $attributes ) {

$navigation_name = $attributes['ariaLabel'] ?? '';

if ( ! empty( $navigation_name ) ) {
return $navigation_name;
}

// Load the navigation post.
if ( array_key_exists( 'ref', $attributes ) ) {
$navigation_post = get_post( $attributes['ref'] );
Expand Down
19 changes: 11 additions & 8 deletions packages/block-library/src/rss/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,20 @@ function render_block_core_rss( $attributes ) {
$author = $item->get_author();
if ( is_object( $author ) ) {
$author = $author->get_name();
$author = '<span class="wp-block-rss__item-author">' . sprintf(
/* translators: byline. %s: author. */
__( 'by %s' ),
esc_html( strip_tags( $author ) )
) . '</span>';
if ( ! empty( $author ) ) {
$author = '<span class="wp-block-rss__item-author">' . sprintf(
/* translators: byline. %s: author. */
__( 'by %s' ),
esc_html( strip_tags( $author ) )
) . '</span>';
}
}
}

$excerpt = '';
if ( $attributes['displayExcerpt'] ) {
$excerpt = html_entity_decode( $item->get_description(), ENT_QUOTES, get_option( 'blog_charset' ) );
$excerpt = '';
$description = $item->get_description();
if ( $attributes['displayExcerpt'] && ! empty( $description ) ) {
$excerpt = html_entity_decode( $description, ENT_QUOTES, get_option( 'blog_charset' ) );
$excerpt = esc_attr( wp_trim_words( $excerpt, $attributes['excerptLength'], ' [&hellip;]' ) );

// Change existing [...] to [&hellip;].
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/base-control/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import BaseControl, { useBaseControlProps } from '..';
import Button from '../../button';

const meta: Meta< typeof BaseControl > = {
title: 'Components/BaseControl',
title: 'Components/Selection & Input/Common/BaseControl',
id: 'components-basecontrol',
component: BaseControl,
subcomponents: {
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import { HStack } from '../../h-stack';

const meta: Meta< typeof CheckboxControl > = {
component: CheckboxControl,
title: 'Components/CheckboxControl',
title: 'Components/Selection & Input/Common/CheckboxControl',
id: 'components-checkboxcontrol',
argTypes: {
onChange: {
action: 'onChange',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ const CircularOptionPickerStoryContext = createContext< {
} >( {} );

const meta: Meta< typeof CircularOptionPicker > = {
title: 'Components/CircularOptionPicker',
title: 'Components/Selection & Input/Color/CircularOptionPicker',
id: 'components-circularoptionpicker',
component: CircularOptionPicker,
subcomponents: {
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import ColorIndicator from '..';

const meta: Meta< typeof ColorIndicator > = {
component: ColorIndicator,
title: 'Components/ColorIndicator',
title: 'Components/Selection & Input/Color/ColorIndicator',
id: 'components-colorindicator',
argTypes: {
colorValue: {
control: { type: 'color' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import { useState } from '@wordpress/element';
import ColorPalette from '..';

const meta: Meta< typeof ColorPalette > = {
title: 'Components/ColorPalette',
title: 'Components/Selection & Input/Color/ColorPalette',
id: 'components-colorpalette',
component: ColorPalette,
argTypes: {
as: { control: { type: null } },
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/color-picker/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { ColorPicker } from '../component';

const meta: Meta< typeof ColorPicker > = {
component: ColorPicker,
title: 'Components/ColorPicker',
title: 'Components/Selection & Input/Color/ColorPicker',
id: 'components-colorpicker',
argTypes: {
as: { control: { type: null } },
color: { control: { type: null } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ const countries = [
];

const meta: Meta< typeof ComboboxControl > = {
title: 'Components/ComboboxControl',
title: 'Components/Selection & Input/Common/ComboboxControl',
id: 'components-comboboxcontrol',
component: ComboboxControl,
argTypes: {
value: { control: { type: null } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import { useState } from '@wordpress/element';
import CustomGradientPicker from '../';

const meta: Meta< typeof CustomGradientPicker > = {
title: 'Components/CustomGradientPicker',
title: 'Components/Selection & Input/Color/CustomGradientPicker',
id: 'components-customgradientpicker',
component: CustomGradientPicker,
parameters: {
actions: { argTypesRegex: '^on.*' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import { useState } from '@wordpress/element';
import CustomSelectControlV2 from '..';

const meta: Meta< typeof CustomSelectControlV2 > = {
title: 'Components/CustomSelectControl v2',
title: 'Components/Selection & Input/Common/CustomSelectControl v2',
id: 'components-customselectcontrol-v2',
component: CustomSelectControlV2,
subcomponents: {
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import DateTimePicker from '../date-time';
import { daysFromNow, isWeekend } from './utils';

const meta: Meta< typeof DateTimePicker > = {
title: 'Components/DateTimePicker',
title: 'Components/Selection & Input/Time & Date/DateTimePicker',
id: 'components-datetimepicker',
component: DateTimePicker,
argTypes: {
currentDate: { control: 'date' },
Expand Down
Loading

0 comments on commit 6302cbf

Please sign in to comment.