WordPress.org

Make WordPress Core

Opened 4 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#54393 closed task (blessed) (fixed)

Add navigation areas REST API endpoint from Gutenberg plugin

Reported by: noisysocks Owned by: noisysocks
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: REST API Keywords: has-patch has-unit-tests
Focuses: rest-api Cc:

Description

Need to copy WP_REST_Block_Navigation_Areas_Controller into Core in order for the Navigation block to work in WP 5.9.

https://github.com/WordPress/gutenberg/blob/trunk/lib/class-wp-rest-block-navigation-areas-controller.php

Change History (7)

#1 @spacedmonkey
4 weeks ago

  • Focuses rest-api added
  • Keywords has-patch needs-unit-tests added

Please ensure that unit tests are added before committing to core. Looking at the gutenberg repo, there is no test coverage at the moment. This is a little worrying as merge deadline is Tuesday the 9th.

CC @adamziel for visibility.

#2 @spacedmonkey
4 weeks ago

Batching should also be enabled with this new endpoint.

#3 @TimothyBlynJacobs
4 weeks ago

The namespace on this needs to be stabilized as well.

#4 @antonvlasenko
4 weeks ago

@spacedmonkey You've added a has-patch tag, but I cannot find the patch anywhere.
Did you mean this PR: https://github.com/WordPress/gutenberg/pull/36178 ?

This ticket was mentioned in PR #1862 on WordPress/wordpress-develop by anton-vlasenko.


3 weeks ago

  • Keywords has-unit-tests added; needs-unit-tests removed

Please don't review this PR yet. It's WIP.

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

#6 @noisysocks
3 weeks ago

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

In 52133:

REST API: Add /wp/v2/block-navigation-areas endpoint

Copies WP_REST_Block_Navigation_Areas_Controller from the Gutenberg plugin. This
provides the /wp/v2/block-navigation-areas endpoint used by the Navigation
block.

Props antonvlasenko, TimothyBlynJacobs.
Fixes #54393.

#7 @prbot
3 weeks ago

noisysocks commented on PR #1862:

Thanks @anton-vlasenko and @TimothyBJacobs!

Note: See TracTickets for help on using tickets.