Skip to content

Commit ecc8740

Browse files
committed
prep build 07/03
2 parents 4ebc5a8 + 2e27ad0 commit ecc8740

File tree

53 files changed

+1236
-678
lines changed

Some content is hidden

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

53 files changed

+1236
-678
lines changed

backport-changelog/6.7/6910.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
https://github.com/WordPress/wordpress-develop/pull/6910
2+
3+
* https://github.com/WordPress/gutenberg/pull/59483
4+
* https://github.com/WordPress/gutenberg/pull/60652
5+
* https://github.com/WordPress/gutenberg/pull/62777

changelog.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
== Changelog ==
22

3-
= 18.7.0-rc.1 =
4-
3+
= 18.7.0 =
54

65
## Changelog
76

@@ -190,6 +189,8 @@ The following contributors merged PRs in this release:
190189
@aaronrobertshaw @aatanasovdev @afercia @ajlende @akasunil @amitraj2203 @artemiomorales @carolinan @cbravobernal @ciampo @creativecoder @DaniGuardiola @dilipbheda @ellatrix @fullofcaffeine @geriux @graylaurenm @gziolo @itzmekhokan @ivan-ottinger @jameskoster @jorgefilipecosta @juanmaguitar @kevin940726 @luisherranz @MaggieCabrera @matiasbenedetto @michakrapp @mirka @noisysocks @ntsekouras @oandregal @peterwilsoncc @ramonjd @sabernhardt @SantosGuillamot @saulyz @shail-mehta @sirreal @snehapatil2001 @spacedmonkey @stokesman @t-hamano @talldan @tellthemachines @up1512001 @vcanales @vipul0425 @westonruter @youknowriad
191190

192191

192+
193+
193194
= 18.6.1 =
194195

195196

docs/how-to-guides/curating-the-editor-experience/disable-editor-functionality.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,21 @@ add_filter( 'block_editor_settings_all', 'example_restrict_code_editor_access',
8787
```
8888

8989
This code prevents all users from accessing the Code Editor. You could also add [capability](https://wordpress.org/documentation/article/roles-and-capabilities/) checks to disable access for specific users.
90+
91+
## Disable formatting options for RichText blocks
92+
93+
Blocks that support [RichText](https://developer.wordpress.org/block-editor/reference-guides/richtext/) come with the default formatting options provided by WordPress.
94+
95+
Formatting options need to be disabled with JavaScript using `unregisterFormatType`. The code below will globally disable the Inline Image, Language, Keyboard Input, Subscript, and Superscript options.
96+
97+
```js
98+
wp.domReady( () => {
99+
wp.richText.unregisterFormatType( 'core/image' );
100+
wp.richText.unregisterFormatType( 'core/language' );
101+
wp.richText.unregisterFormatType( 'core/keyboard' );
102+
wp.richText.unregisterFormatType( 'core/subscript' );
103+
wp.richText.unregisterFormatType( 'core/superscript' );
104+
});
105+
```
106+
107+
This JavaScript should be enqueued much like the block variation example above.

lib/block-supports/layout.php

Lines changed: 50 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -466,29 +466,8 @@ function gutenberg_get_layout_style( $selector, $layout, $has_block_gap_support
466466
}
467467
}
468468
} elseif ( 'grid' === $layout_type ) {
469-
if ( ! empty( $layout['columnCount'] ) ) {
470-
$layout_styles[] = array(
471-
'selector' => $selector,
472-
'declarations' => array( 'grid-template-columns' => 'repeat(' . $layout['columnCount'] . ', minmax(0, 1fr))' ),
473-
);
474-
if ( ! empty( $layout['rowCount'] ) ) {
475-
$layout_styles[] = array(
476-
'selector' => $selector,
477-
'declarations' => array( 'grid-template-rows' => 'repeat(' . $layout['rowCount'] . ', minmax(0, 1fr))' ),
478-
);
479-
}
480-
} else {
481-
$minimum_column_width = ! empty( $layout['minimumColumnWidth'] ) ? $layout['minimumColumnWidth'] : '12rem';
482-
483-
$layout_styles[] = array(
484-
'selector' => $selector,
485-
'declarations' => array(
486-
'grid-template-columns' => 'repeat(auto-fill, minmax(min(' . $minimum_column_width . ', 100%), 1fr))',
487-
'container-type' => 'inline-size',
488-
),
489-
);
490-
}
491-
469+
// Deal with block gap first so it can be used for responsive computation.
470+
$responsive_gap_value = '1.2rem';
492471
if ( $has_block_gap_support && isset( $gap_value ) ) {
493472
$combined_gap_value = '';
494473
$gap_sides = is_array( $gap_value ) ? array( 'top', 'left' ) : array( 'top' );
@@ -506,14 +485,53 @@ function gutenberg_get_layout_style( $selector, $layout, $has_block_gap_support
506485
}
507486
$combined_gap_value .= "$process_value ";
508487
}
509-
$gap_value = trim( $combined_gap_value );
488+
$gap_value = trim( $combined_gap_value );
489+
$responsive_gap_value = $gap_value;
490+
}
510491

511-
if ( null !== $gap_value && ! $should_skip_gap_serialization ) {
492+
if ( ! empty( $layout['columnCount'] ) && ! empty( $layout['minimumColumnWidth'] ) ) {
493+
$max_value = 'max(' . $layout['minimumColumnWidth'] . ', (100% - (' . $responsive_gap_value . ' * (' . $layout['columnCount'] . ' - 1))) /' . $layout['columnCount'] . ')';
494+
$layout_styles[] = array(
495+
'selector' => $selector,
496+
'declarations' => array(
497+
'grid-template-columns' => 'repeat(auto-fill, minmax(' . $max_value . ', 1fr))',
498+
'container-type' => 'inline-size',
499+
),
500+
);
501+
if ( ! empty( $layout['rowCount'] ) ) {
512502
$layout_styles[] = array(
513503
'selector' => $selector,
514-
'declarations' => array( 'gap' => $gap_value ),
504+
'declarations' => array( 'grid-template-rows' => 'repeat(' . $layout['rowCount'] . ', minmax(8px, auto))' ),
505+
);
506+
}
507+
} elseif ( ! empty( $layout['columnCount'] ) ) {
508+
$layout_styles[] = array(
509+
'selector' => $selector,
510+
'declarations' => array( 'grid-template-columns' => 'repeat(' . $layout['columnCount'] . ', minmax(0, 1fr))' ),
511+
);
512+
if ( ! empty( $layout['rowCount'] ) ) {
513+
$layout_styles[] = array(
514+
'selector' => $selector,
515+
'declarations' => array( 'grid-template-rows' => 'repeat(' . $layout['rowCount'] . ', minmax(8px, auto))' ),
515516
);
516517
}
518+
} else {
519+
$minimum_column_width = ! empty( $layout['minimumColumnWidth'] ) ? $layout['minimumColumnWidth'] : '12rem';
520+
521+
$layout_styles[] = array(
522+
'selector' => $selector,
523+
'declarations' => array(
524+
'grid-template-columns' => 'repeat(auto-fill, minmax(min(' . $minimum_column_width . ', 100%), 1fr))',
525+
'container-type' => 'inline-size',
526+
),
527+
);
528+
}
529+
530+
if ( $has_block_gap_support && null !== $gap_value && ! $should_skip_gap_serialization ) {
531+
$layout_styles[] = array(
532+
'selector' => $selector,
533+
'declarations' => array( 'gap' => $gap_value ),
534+
);
517535
}
518536
}
519537

@@ -653,17 +671,19 @@ function gutenberg_render_layout_support_flag( $block_content, $block ) {
653671
* A default gap value is used for this computation because custom gap values may not be
654672
* viable to use in the computation of the container query value.
655673
*/
656-
$default_gap_value = 'px' === $parent_column_unit ? 24 : 1.5;
657-
$container_query_value = $highest_number * $parent_column_value + ( $highest_number - 1 ) * $default_gap_value;
658-
$container_query_value = $container_query_value . $parent_column_unit;
674+
$default_gap_value = 'px' === $parent_column_unit ? 24 : 1.5;
675+
$container_query_value = $highest_number * $parent_column_value + ( $highest_number - 1 ) * $default_gap_value;
676+
$minimum_container_query_value = $parent_column_value * 2 + $default_gap_value - 1;
677+
$container_query_value = max( $container_query_value, $minimum_container_query_value ) . $parent_column_unit;
659678
// If a span is set we want to preserve it as long as possible, otherwise we just reset the value.
660-
$grid_column_value = $column_span ? '1/-1' : 'auto';
679+
$grid_column_value = $column_span && $column_span > 1 ? '1/-1' : 'auto';
661680

662681
$child_layout_styles[] = array(
663682
'rules_group' => "@container (max-width: $container_query_value )",
664683
'selector' => ".$container_content_class",
665684
'declarations' => array(
666685
'grid-column' => $grid_column_value,
686+
'grid-row' => 'auto',
667687
),
668688
);
669689
}

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gutenberg",
3-
"version": "18.7.0-rc.1",
3+
"version": "18.7.0",
44
"private": true,
55
"description": "A new WordPress editor experience.",
66
"author": "The WordPress Contributors",

packages/base-styles/_z-index.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ $z-layers: (
6565
// Needs to be below media library that has a z-index of 160000.
6666
"{core/video track editor popover}": 160000 - 10,
6767

68-
// Needs to be below media library that has a z-index of 160000.
68+
// Needs to be below media library (.media-model) that has a z-index of 160000.
6969
".block-editor-format-toolbar__image-popover": 160000 - 10,
70+
// Below the media library backdrop (.media-modal-backdrop), which has a z-index of 159900.
71+
".block-editor-global-styles-background-panel__popover": 159900 - 10,
7072

7173
// Small screen inner blocks overlay must be displayed above drop zone,
7274
// settings menu, and movers.

0 commit comments

Comments
 (0)