#61111 closed enhancement (fixed)
Add support for column and row span in grid layout child blocks.
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.6 | Priority: | normal |
| Severity: | normal | Version: | 6.6 |
| Component: | Editor | Keywords: | gutenberg-merge needs-patch |
| Focuses: | Cc: |
Description
Children of blocks with grid layout should be able to span multiple grid columns and rows.
To that effect, the following Gutenberg PRs need to be synced to core:
https://github.com/WordPress/gutenberg/pull/58539
https://github.com/WordPress/gutenberg/pull/59057
https://github.com/WordPress/gutenberg/pull/59452
Change History (8)
This ticket was mentioned in PR #6493 on WordPress/wordpress-develop by @isabel_brison.
21 months ago
#1
- Keywords has-patch added
@isabel_brison commented on PR #6493:
21 months ago
#2
I've added a test so marking this one ready for review!
#3
@
20 months ago
- Owner set to isabel_brison
- Resolution set to fixed
- Status changed from new to closed
In 58170:
@isabel_brison commented on PR #6493:
20 months ago
#4
Committed in r58170.
#5
@
20 months ago
- Keywords needs-patch added; has-patch removed
- Resolution fixed deleted
- Status changed from closed to reopened
I'm seeing an error running phpunit that a bisect shows is coming from this commit.
It appears to be coming from the Test_Block_Supports_Layout::data_wp_add_parent_layout_to_parsed_block() method which registers parent_block without a blockName property.
I'm unclear whether the regression is in the test suite or a change to graceful handling when registering blocks.
$ ./vendor/bin/phpunit --group dont-run-tests
Installing...
Running as single site... To run multisite, use -c tests/phpunit/multisite.xml
Not running ajax tests. To execute these, use --group ajax.
Not running ms-files tests. To execute these, use --group ms-files.
Not running external-http tests. To execute these, use --group external-http.
Notice: Undefined index: blockName in /vagrant/wordpress-develop/src/wp-includes/class-wp-block.php on line 131
Call Stack:
0.0079 411184 1. {main}() /vagrant/wordpress-develop/vendor/bin/phpunit:0
0.0100 425440 2. include('phpvfscomposer:///vagrant/wordpress-develop/vendor/phpunit/phpunit/phpunit') /vagrant/wordpress-develop/vendor/bin/phpunit:118
...snip...
2.3503 50577920 17. Test_Block_Supports_Layout->data_wp_add_parent_layout_to_parsed_block() /vagrant/wordpress-develop/vendor/phpunit/phpunit/src/Util/Annotation/DocBlock.php:421
2.3503 50578896 18. WP_Block->__construct($block = ['attrs' => ['layout' => ['type' => 'grid']]], $available_context = ???, $registry = ???) /vagrant/wordpress-develop/tests/phpunit/tests/block-supports/layout.php:446
PHPUnit 9.6.19 by Sebastian Bergmann and contributors.
Warning: Your XML configuration validates against a deprecated schema.
Suggestion: Migrate your XML configuration using "--migrate-configuration"!
No tests executed!
Trac ticket: https://core.trac.wordpress.org/ticket/61111
Syncs the changes from https://github.com/WordPress/gutenberg/pull/58539, https://github.com/WordPress/gutenberg/pull/59057 and https://github.com/WordPress/gutenberg/pull/59452 to core.
To test, paste the following markup in a post:
<details>
<summary>test markup</summary>
</details>
Save and view on the front end. It should show grid items spanning multiple columns and rows:
Todo: add tests.