Skip to content

Commit

Permalink
Block Editor: Update the packages with a number of fixes targeted for…
Browse files Browse the repository at this point in the history
… Beta 4.

It includes fixes from these two backport PRs: 

 - WordPress/gutenberg#32992
 - WordPress/gutenberg#32956

Props gziolo, ryelle, ntsekouras, desrosj, jorgefilipecosta.
See #53397

Built from https://develop.svn.wordpress.org/trunk@51241


git-svn-id: http://core.svn.wordpress.org/trunk@50850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
youknowriad committed Jun 25, 2021
1 parent 578cda5 commit be0d5b2
Show file tree
Hide file tree
Showing 48 changed files with 1,303 additions and 919 deletions.
2 changes: 1 addition & 1 deletion wp-includes/assets/script-loader-packages.php

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions wp-includes/block-patterns/query-grid-posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
'content' => '<!-- wp:query {"query":{"perPage":6,"pages":0,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"exclude","inherit":false},"displayLayout":{"type":"flex","columns":3}} -->
<div class="wp-block-query">
<!-- wp:post-template -->
<!-- wp:group {"tagName":"main","style":{"spacing":{"padding":{"top":"30px","right":"30px","bottom":"30px","left":"30px"}}},"layout":{"inherit":false}} -->
<main class="wp-block-group" style="padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px"><!-- wp:post-title {"isLink":true} /-->
<!-- wp:group {"style":{"spacing":{"padding":{"top":"30px","right":"30px","bottom":"30px","left":"30px"}}},"layout":{"inherit":false}} -->
<div class="wp-block-group" style="padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px"><!-- wp:post-title {"isLink":true} /-->
<!-- wp:post-excerpt {"wordCount":20} /-->
<!-- wp:post-date /--></div>
<!-- /wp:group -->
Expand Down
6 changes: 3 additions & 3 deletions wp-includes/block-patterns/query-offset-posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
'title' => _x( 'Offset', 'Block pattern title' ),
'blockTypes' => array( 'core/query' ),
'categories' => array( 'query' ),
'content' => '<!-- wp:group {"tagName":"main","style":{"spacing":{"padding":{"top":"30px","right":"30px","bottom":"30px","left":"30px"}}},"layout":{"inherit":false}} -->
<main class="wp-block-group" style="padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px"><!-- wp:columns -->
'content' => '<!-- wp:group {"style":{"spacing":{"padding":{"top":"30px","right":"30px","bottom":"30px","left":"30px"}}},"layout":{"inherit":false}} -->
<div class="wp-block-group" style="padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px"><!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"width":"50%"} -->
<div class="wp-block-column" style="flex-basis:50%"><!-- wp:query {"query":{"perPage":2,"pages":0,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"exclude","inherit":false},"displayLayout":{"type":"list"}} -->
<div class="wp-block-query"><!-- wp:post-template -->
Expand All @@ -35,6 +35,6 @@
<!-- /wp:post-template --></div>
<!-- /wp:query --></div>
<!-- /wp:column --></div>
<!-- /wp:columns --></main>
<!-- /wp:columns --></div>
<!-- /wp:group -->',
);
10 changes: 4 additions & 6 deletions wp-includes/blocks/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,17 @@
*/

/**
* When the `core/file` block is rendering, check if we need to enqueue the `'wp-block-library-file` script.
* When the `core/file` block is rendering, check if we need to enqueue the `'wp-block-file-view` script.
*
* @param array $attributes The block attributes.
* @param array $content The block content.
*
* @return string Returns the block content.
*/
function render_block_core_file( $attributes, $content ) {
if ( ! empty( $attributes['displayPreview'] ) ) {
// Check if it's already enqueued, so we don't add the inline script multiple times.
if ( ! wp_script_is( 'wp-block-library-file' ) ) {
wp_enqueue_script( 'wp-block-library-file', plugins_url( 'file/frontend.js', __FILE__ ) );
}
$should_load_view_script = ! empty( $attributes['displayPreview'] ) && ! wp_script_is( 'wp-block-file-view' );
if ( $should_load_view_script ) {
wp_enqueue_script( 'wp-block-file-view' );
}

return $content;
Expand Down
1 change: 1 addition & 0 deletions wp-includes/blocks/file/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"anchor": true,
"align": true
},
"viewScript": "file:./view.min.js",
"editorStyle": "wp-block-file-editor",
"style": "wp-block-file"
}
19 changes: 19 additions & 0 deletions wp-includes/blocks/site-logo/editor-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,23 @@
}
.wp-block-site-logo .components-placeholder .components-drop-zone__content-text {
display: none;
}

.editor-styles-wrapper .site-logo_placeholder {
display: flex;
flex-direction: row;
align-items: flex-start;
border-radius: 2px;
background-color: #fff;
box-shadow: inset 0 0 0 1px #1e1e1e;
padding: 12px;
}
.editor-styles-wrapper .site-logo_placeholder svg {
margin-left: 12px;
}
.editor-styles-wrapper .site-logo_placeholder p {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-size: 13px;
margin: 0;
line-height: initial;
}
2 changes: 1 addition & 1 deletion wp-includes/blocks/site-logo/editor-rtl.min.css

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

19 changes: 19 additions & 0 deletions wp-includes/blocks/site-logo/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,23 @@
}
.wp-block-site-logo .components-placeholder .components-drop-zone__content-text {
display: none;
}

.editor-styles-wrapper .site-logo_placeholder {
display: flex;
flex-direction: row;
align-items: flex-start;
border-radius: 2px;
background-color: #fff;
box-shadow: inset 0 0 0 1px #1e1e1e;
padding: 12px;
}
.editor-styles-wrapper .site-logo_placeholder svg {
margin-right: 12px;
}
.editor-styles-wrapper .site-logo_placeholder p {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-size: 13px;
margin: 0;
line-height: initial;
}
2 changes: 1 addition & 1 deletion wp-includes/blocks/site-logo/editor.min.css

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

1 change: 0 additions & 1 deletion wp-includes/class-wp-theme-json.php
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,6 @@ public function merge( $incoming ) {
* In those cases, we want to replace the existing with the incoming value, if it exists.
*/
$to_replace = array();
$to_replace[] = array( 'custom' );
$to_replace[] = array( 'spacing', 'units' );
$to_replace[] = array( 'color', 'duotone' );
foreach ( self::VALID_ORIGINS as $origin ) {
Expand Down
1 change: 1 addition & 0 deletions wp-includes/css/dist/block-editor/style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -1990,6 +1990,7 @@
background-color: #1e1e1e;
color: #fff;
border-radius: 2px;
flex: 1 0 auto;
}

.block-editor-color-gradient-control .block-editor-color-gradient-control__color-indicator {
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/css/dist/block-editor/style-rtl.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions wp-includes/css/dist/block-editor/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1990,6 +1990,7 @@
background-color: #1e1e1e;
color: #fff;
border-radius: 2px;
flex: 1 0 auto;
}

.block-editor-color-gradient-control .block-editor-color-gradient-control__color-indicator {
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/css/dist/block-editor/style.min.css

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions wp-includes/css/dist/block-library/editor-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -1818,6 +1818,25 @@ body.admin-bar .wp-block-navigation__responsive-container.is-menu-open {
display: none;
}

.editor-styles-wrapper .site-logo_placeholder {
display: flex;
flex-direction: row;
align-items: flex-start;
border-radius: 2px;
background-color: #fff;
box-shadow: inset 0 0 0 1px #1e1e1e;
padding: 12px;
}
.editor-styles-wrapper .site-logo_placeholder svg {
margin-left: 12px;
}
.editor-styles-wrapper .site-logo_placeholder p {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-size: 13px;
margin: 0;
line-height: initial;
}

.wp-block-site-tagline__placeholder {
padding: 1em 0;
border: 1px dashed;
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/css/dist/block-library/editor-rtl.min.css

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions wp-includes/css/dist/block-library/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -1823,6 +1823,25 @@ body.admin-bar .wp-block-navigation__responsive-container.is-menu-open {
display: none;
}

.editor-styles-wrapper .site-logo_placeholder {
display: flex;
flex-direction: row;
align-items: flex-start;
border-radius: 2px;
background-color: #fff;
box-shadow: inset 0 0 0 1px #1e1e1e;
padding: 12px;
}
.editor-styles-wrapper .site-logo_placeholder svg {
margin-right: 12px;
}
.editor-styles-wrapper .site-logo_placeholder p {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-size: 13px;
margin: 0;
line-height: initial;
}

.wp-block-site-tagline__placeholder {
padding: 1em 0;
border: 1px dashed;
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/css/dist/block-library/editor.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions wp-includes/css/dist/customize-widgets/style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -300,14 +300,14 @@
#customize-theme-controls .customize-pane-child.customize-widgets__sidebar-section {
min-height: 100%;
background-color: #fff;
padding-top: 10px !important;
padding-top: 12px !important;
}
#customize-theme-controls .customize-pane-child.customize-widgets__sidebar-section.open {
overflow: unset;
}
#customize-theme-controls .customize-pane-child.customize-widgets__sidebar-section .customize-section-title {
position: static !important;
top: 0 !important;
margin-top: -12px !important;
width: unset !important;
}

Expand Down
Loading

0 comments on commit be0d5b2

Please sign in to comment.