Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WP6.2] Revert dynamic block anchor support #48592

Merged
merged 4 commits into from Mar 1, 2023

Conversation

t-hamano
Copy link
Contributor

@t-hamano t-hamano commented Feb 28, 2023

What?

This PR removes anchor support from block.json in dynamic blocks, among changes made in #44771.

Why?

As reported by #48232, a problem was found in backward compatibility. A resolution was attempted in #48438, but more discussion and exploration are needed, so we have decided to revert this feature in the WordPress 6.2 release.

How?

As noted in this comment, we will follow these steps:

  • Revert block.json anchor support from Add anchor support for dynamic blocks #44771.
  • Remove block-supports/anchor.php from the core.
  • Leave the $attributes_to_merge change in the core so that the feature can be implemented from the plugin.

This PR falls under the first step of the above.

First of all, I reverted the commit made in #44771. Then I re-added the PHP and documentation changes that did not need to be changed in this step.

@Mamaduka
Copy link
Member

I think there's no need to keep PHP changes in the wp/6.2 branch since the feature isn't shipping with this WP version.

@t-hamano
Copy link
Contributor Author

I think there's no need to keep PHP changes in the wp/6.2 branch since the feature isn't shipping with this WP version.

Makes sense, reverted.

@github-actions
Copy link

github-actions bot commented Feb 28, 2023

Flaky tests detected in 235f68e.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4300157637
📝 Reported issues:

@t-hamano
Copy link
Contributor Author

t-hamano commented Mar 1, 2023

The E2E test is failing but does not appear to be related to this PR.

@Mamaduka Mamaduka force-pushed the revert/dynamic-block-anchor-support branch from 6d71513 to 235f68e Compare March 1, 2023 04:46
@Mamaduka
Copy link
Member

Mamaduka commented Mar 1, 2023

Rebased the branch. The issue should be fixed after this backport #48206 (comment).

@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended [Priority] High Used to indicate top priority items that need quick attention labels Mar 1, 2023
@Mamaduka Mamaduka merged commit 3854ce8 into wp/6.2 Mar 1, 2023
44 checks passed
@Mamaduka Mamaduka deleted the revert/dynamic-block-anchor-support branch March 1, 2023 05:25
@t-hamano
Copy link
Contributor Author

t-hamano commented Mar 1, 2023

Thanks for the response, @Mamaduka!

I would like to start with the following next steps.

Remove block-supports/anchor.php from the core.

@Mamaduka
Copy link
Member

Mamaduka commented Mar 1, 2023

@t-hamano, I already handled that this morning - https://core.trac.wordpress.org/ticket/57830#ticket.

pento pushed a commit to WordPress/wordpress-develop that referenced this pull request Mar 1, 2023
[55230] introduced a regression to the content markup. This changeset is a partial revert to remove the added `wp-includes/block-supports/anchor.php` file. 

The change of adding `'id'` to `$attributes_to_merge` in `get_block_wrapper_attributes()` is not reverted as this change did not impact the regression and helps to support continue development in Gutenberg for the anchor support in dynamic blocks feature.

Reference:
* [WordPress/gutenberg#48592 Gutenberg PR 48592].

Follow-up [55230].

Props wildworks, mamaduka, hellofromTonya. 
Fixes #57830.
See #56852.

git-svn-id: https://develop.svn.wordpress.org/trunk@55443 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Mar 1, 2023
[55230] introduced a regression to the content markup. This changeset is a partial revert to remove the added `wp-includes/block-supports/anchor.php` file. 

The change of adding `'id'` to `$attributes_to_merge` in `get_block_wrapper_attributes()` is not reverted as this change did not impact the regression and helps to support continue development in Gutenberg for the anchor support in dynamic blocks feature.

Reference:
* [WordPress/gutenberg#48592 Gutenberg PR 48592].

Follow-up [55230].

Props wildworks, mamaduka, hellofromTonya. 
Fixes #57830.
See #56852.
Built from https://develop.svn.wordpress.org/trunk@55443


git-svn-id: http://core.svn.wordpress.org/trunk@54976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to platformsh/wordpress-performance that referenced this pull request Mar 1, 2023
[55230] introduced a regression to the content markup. This changeset is a partial revert to remove the added `wp-includes/block-supports/anchor.php` file. 

The change of adding `'id'` to `$attributes_to_merge` in `get_block_wrapper_attributes()` is not reverted as this change did not impact the regression and helps to support continue development in Gutenberg for the anchor support in dynamic blocks feature.

Reference:
* [WordPress/gutenberg#48592 Gutenberg PR 48592].

Follow-up [55230].

Props wildworks, mamaduka, hellofromTonya. 
Fixes #57830.
See #56852.
Built from https://develop.svn.wordpress.org/trunk@55443


git-svn-id: https://core.svn.wordpress.org/trunk@54976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
VenusPR added a commit to VenusPR/Wordpress_Richard that referenced this pull request Mar 9, 2023
[55230] introduced a regression to the content markup. This changeset is a partial revert to remove the added `wp-includes/block-supports/anchor.php` file. 

The change of adding `'id'` to `$attributes_to_merge` in `get_block_wrapper_attributes()` is not reverted as this change did not impact the regression and helps to support continue development in Gutenberg for the anchor support in dynamic blocks feature.

Reference:
* [WordPress/gutenberg#48592 Gutenberg PR 48592].

Follow-up [55230].

Props wildworks, mamaduka, hellofromTonya. 
Fixes #57830.
See #56852.
Built from https://develop.svn.wordpress.org/trunk@55443


git-svn-id: http://core.svn.wordpress.org/trunk@54976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Priority] High Used to indicate top priority items that need quick attention [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants