Make WordPress Core

Opened 18 months ago

Last modified 7 months ago

#56852 assigned enhancement

Support IDs in block wrapper attributes

Reported by: soean's profile Soean Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Editor Keywords: gutenberg-merge
Focuses: Cc:

Description

At the moment dynamic rendered blocks don't support anchors.

To enable this support, we need to add this feature to the Editor and add the id in get_block_wrapper_attributes() to the block.

I already created a PR to add this support to the editor:
https://github.com/WordPress/gutenberg/pull/44771

This ticket is for adding it to the renderd block HTML.

Change History (19)

This ticket was mentioned in PR #3497 on WordPress/wordpress-develop by @Soean.


18 months ago
#1

  • Keywords has-patch added

Adds the support for the ID attribute for dynamic rendered blocks.

Trac ticket: https://core.trac.wordpress.org/ticket/56852

Enable support in the Editor: https://github.com/WordPress/gutenberg/pull/44771

#2 @poena
15 months ago

  • Milestone changed from Awaiting Review to 6.2

It would be good if we could solve this in 6.2

#3 @costdev
15 months ago

This ticket is blocked until the corresponding editor PR is merged and backported to Core.

I've reached out to @annezazu to get confirmation on whether this is likely to land in 6.2.

Let's give the Editor Triage/Tech leads time to evaluate if this can land, otherwise we can move this ticket to the 6.3 milestone when it becomes available.

#4 @Soean
15 months ago

The editor PR is merged.
I backported the PHP changes to this ticket PR: https://github.com/WordPress/wordpress-develop/pull/3497

#5 @Mamaduka
14 months ago

  • Keywords gutenberg-merge added

#6 @flixos90
14 months ago

  • Owner set to flixos90
  • Status changed from new to reviewing

#7 @jorgefilipecosta
14 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 55230:

Block editor: Add ID support to block wrapper attributes.

This commit adds support for the ID attribute for dynamically rendered blocks.

Props Soean, flixos90, poena, costdev, Mamaduka.
Closes #56852.

#9 @hellofromTonya
14 months ago

  • Milestone changed from 6.2 to 6.3
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening as [55230] introduced a content markup regression. See #57830 for details.

#10 @hellofromTonya
14 months ago

In 55443:

Editor: Partial revert of r55230.

[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:

Follow-up [55230].

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

#11 @hellofromTonya
14 months ago

  • Keywords has-patch removed

This ticket was mentioned in Slack in #core by oglekler. View the logs.


10 months ago

#13 @flixos90
10 months ago

@Soean @Mamaduka @jorgefilipecosta Just spotted this ticket thanks to the bug scrub, I had missed that it partially got reverted before today. Is there anything we can reasonably do here to fix this properly for 6.3?

#14 @Mamaduka
10 months ago

@flixos90, there's no plan to ship it in WP 6.3; we still don't have a good solution for the backward compatibility problem with "static" blocks.

Here's the new tracking issue - https://github.com/WordPress/gutenberg/issues/51402.

#15 @oglekler
10 months ago

  • Milestone changed from 6.3 to 6.4

According to previous #comment:14, I am moving this to 6.4

Last edited 10 months ago by oglekler (previous) (diff)

This ticket was mentioned in Slack in #core by oglekler. View the logs.


8 months ago

#17 @flixos90
7 months ago

  • Owner flixos90 deleted
  • Status changed from reopened to assigned

@Mamaduka Any update on this one, or specifically https://github.com/WordPress/gutenberg/issues/51402? The last comment is from almost 2 months ago, hence checking in whether this is still planned for 6.4 or not.

#18 @Mamaduka
7 months ago

@flixos90, that's the last status, as far as I know. I doubt the feature will make it in WP 6.4; it should be safe to punt to future releases.

#19 @flixos90
7 months ago

  • Milestone changed from 6.4 to Future Release

Thank you for the update @Mamaduka!

Note: See TracTickets for help on using tickets.