Make WordPress Core

Opened 20 months ago

Closed 20 months ago

Last modified 20 months ago

#55531 closed enhancement (fixed)

Editor: Make block type aware of ancestor prop

Reported by: darerodz's profile darerodz Owned by: gziolo's profile gziolo
Milestone: 6.0 Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch has-unit-tests needs-dev-note commit needs-docs
Focuses: Cc:

Description

The ancestor prop was recently added to the block.json schema, in Gutenberg.

This new field should be handled in the WP_Block_Type class, in the REST API endpoint for block types, and ensure it gets exposed in the get_block_editor_server_block_settings function.

Change History (8)

This ticket was mentioned in PR #2521 on WordPress/wordpress-develop by DAreRodz.


20 months ago
#1

  • Keywords has-patch has-unit-tests added

This simple PR adds support for the new ancestor property, making the WP_Block_Type class aware of it and exposing it from the `block-types` REST API endpoint and the `get_block_editor_server_block_settings` function.

The property was recently added to the block.json schema (see https://github.com/WordPress/gutenberg/pull/39894).

Trac ticket: https://core.trac.wordpress.org/ticket/55531#ticket

#2 @gziolo
20 months ago

  • Keywords needs-dev-note added
  • Summary changed from Make block type aware of ancestor prop to Editor: Make block type aware of ancestor prop

#3 @gziolo
20 months ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 6.0

Related PR in Gutenberg with the documentation changes opened by @fabiankaegy:

https://github.com/WordPress/gutenberg/pull/40027

This patch looks great. Thank you @darerodz for working on it.

#4 @gziolo
20 months ago

  • Owner set to gziolo
  • Resolution set to fixed
  • Status changed from new to closed

In 53084:

Editor: Make block type aware of the ancestor field

The ancestor field was recently added to the block.json schema in Gutenberg. See: https://github.com/WordPress/gutenberg/pull/39894.

Props darerodz.
Fixes #55531.

#6 @milana_cap
20 months ago

  • Keywords needs-docs added

#7 follow-up: @gziolo
20 months ago

@milana_cap, see my comment https://core.trac.wordpress.org/ticket/55531#comment:3. PR with documentation changes is ready for review: https://github.com/WordPress/gutenberg/pull/40027.

#8 in reply to: ↑ 7 @milana_cap
20 months ago

Replying to gziolo:

@milana_cap, see my comment https://core.trac.wordpress.org/ticket/55531#comment:3. PR with documentation changes is ready for review: https://github.com/WordPress/gutenberg/pull/40027.

Thank you. I marked this one to have it in our custom query.

Last edited 20 months ago by milana_cap (previous) (diff)
Note: See TracTickets for help on using tickets.