Skip to content

Commit

Permalink
prep build 11/02
Browse files Browse the repository at this point in the history
  • Loading branch information
bph committed Nov 2, 2024
2 parents 0bf9d88 + 49c3bf9 commit ee88301
Show file tree
Hide file tree
Showing 25 changed files with 282 additions and 171 deletions.
31 changes: 31 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
== Changelog ==

= 19.6.0-rc.3 =


## Changelog

### Bug Fixes

#### Block Editor
- Post Editor: Set the default value of the editorTool to edit. ([66636](https://github.com/WordPress/gutenberg/pull/66636))




## Contributors

The following contributors merged PRs in this release:

@arthur791004


= 19.5.1 =


Error: There are no unreleased pull requests associated with the milestone.
at fetchAllPullRequests (/home/runner/work/gutenberg/gutenberg/bin/plugin/commands/changelog.js:721:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async createChangelog (/home/runner/work/gutenberg/gutenberg/bin/plugin/commands/changelog.js:1031:24)
at async getReleaseChangelog (/home/runner/work/gutenberg/gutenberg/bin/plugin/commands/changelog.js:1057:2)
at async Command.<anonymous> (/home/runner/work/gutenberg/gutenberg/bin/plugin/cli.js:11:4)


= 19.6.0-rc.2 =

## Changelog
Expand Down
5 changes: 5 additions & 0 deletions lib/compat/wordpress-6.7/block-bindings.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ function gutenberg_update_meta_args_with_label( $args ) {
return $args;
}

// Don't update schema if not exposed to REST
if ( ! isset( $args['show_in_rest'] ) ) {
return $args;
}

$schema = array( 'title' => $args['label'] );
if ( ! is_array( $args['show_in_rest'] ) ) {
$args['show_in_rest'] = array(
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gutenberg",
"version": "19.6.0-rc.2",
"version": "19.6.0-rc.3",
"private": true,
"description": "A new WordPress editor experience.",
"author": "The WordPress Contributors",
Expand Down
36 changes: 26 additions & 10 deletions packages/block-editor/src/components/block-tools/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { __unstableUseShortcutEventMatch as useShortcutEventMatch } from '@wordp
import { useRef } from '@wordpress/element';
import { switchToBlockType, store as blocksStore } from '@wordpress/blocks';
import { speak } from '@wordpress/a11y';
import { __ } from '@wordpress/i18n';
import { __, sprintf, _n } from '@wordpress/i18n';

/**
* Internal dependencies
Expand Down Expand Up @@ -92,19 +92,35 @@ export default function BlockTools( {
return;
}

if ( isMatch( 'core/block-editor/move-up', event ) ) {
if (
isMatch( 'core/block-editor/move-up', event ) ||
isMatch( 'core/block-editor/move-down', event )
) {
const clientIds = getSelectedBlockClientIds();
if ( clientIds.length ) {
event.preventDefault();
const rootClientId = getBlockRootClientId( clientIds[ 0 ] );
moveBlocksUp( clientIds, rootClientId );
}
} else if ( isMatch( 'core/block-editor/move-down', event ) ) {
const clientIds = getSelectedBlockClientIds();
if ( clientIds.length ) {
event.preventDefault();
const rootClientId = getBlockRootClientId( clientIds[ 0 ] );
moveBlocksDown( clientIds, rootClientId );
const direction = isMatch( 'core/block-editor/move-up', event )
? 'up'
: 'down';
if ( direction === 'up' ) {
moveBlocksUp( clientIds, rootClientId );
} else {
moveBlocksDown( clientIds, rootClientId );
}
const blockLength = Array.isArray( clientIds )
? clientIds.length
: 1;
const message = sprintf(
// translators: %d: the name of the block that has been moved
_n(
'%d block moved.',
'%d blocks moved.',
clientIds.length
),
blockLength
);
speak( message );
}
} else if ( isMatch( 'core/block-editor/duplicate', event ) ) {
const clientIds = getSelectedBlockClientIds();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ export function useShowBlockTools() {
const _showEmptyBlockSideInserter =
clientId &&
! isTyping() &&
editorMode === 'edit' &&
// Hide the block inserter on the navigation mode.
// See https://github.com/WordPress/gutenberg/pull/66636#discussion_r1824728483.
editorMode !== 'navigation' &&
isEmptyDefaultBlock;
const _showBlockToolbarPopover =
! getSettings().hasFixedToolbar &&
Expand Down
File renamed without changes.
15 changes: 7 additions & 8 deletions packages/block-editor/src/utils/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,14 @@ export function getVisibleElementBounds( element ) {
let currentElement;

while ( ( currentElement = stack.pop() ) ) {
for ( const child of currentElement.children ) {
if ( isElementVisible( child ) ) {
let childBounds = child.getBoundingClientRect();
// If the parent is scrollable, use parent's scrollable bounds.
if ( isScrollable( currentElement ) ) {
childBounds = currentElement.getBoundingClientRect();
// Children won’t affect bounds unless the element is not scrollable.
if ( ! isScrollable( currentElement ) ) {
for ( const child of currentElement.children ) {
if ( isElementVisible( child ) ) {
const childBounds = child.getBoundingClientRect();
bounds = rectUnion( bounds, childBounds );
stack.push( child );
}
bounds = rectUnion( bounds, childBounds );
stack.push( child );
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions packages/block-library/src/image/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ figure.wp-block-image:not(.wp-block) {
}
}

.wp-block-image__toolbar_content_textarea__container {
padding: $grid-unit;
}

.wp-block-image__toolbar_content_textarea {
// Corresponds to the size of the textarea in the block inspector.
width: 250px;
Expand Down
Loading

0 comments on commit ee88301

Please sign in to comment.