Make WordPress Core

Opened 7 months ago

Closed 6 months ago

#60723 closed enhancement (fixed)

TT3: Wrap Navigation block in Row within the header.html template part

Reported by: tomjcafferkey's profile tomjcafferkey Owned by: tomjcafferkey's profile tomjcafferkey
Milestone: 6.6 Priority: normal
Severity: normal Version: 6.5
Component: Bundled Theme Keywords: has-patch commit
Focuses: Cc:

Description

Now that the Block Hooks API has been released as part of WordPress 6.4 3PDs may want to insert their own blocks into the header of the TT3 theme, specifically after the Navigation block. This currently causes problems because the Navigation block and it's siblings are treated as flex items due to its parent being a Row block.

Change History (7)

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


7 months ago
#1

  • Keywords has-patch added

Now that the Block Hooks API has been released as part of WordPress 6.4 3PDs may want to insert their own blocks into the header, specifically after the Navigation block. This currently causes problems because the Navigation block and it's siblings are treated as flex items due to its parent being a Row block.

This PR wraps the Navigation block within a Row block of its own. By default the behaviour of the header should remain the same and introduce no regressions but this now means plugins are able to use the Block Hooks API to automatically insert their own blocks using the Navigation as an anchor block without them being treated as flex items (e.g. Mini Cart or My Account blocks)

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

## Testing instructions

  1. Ensure that the TT3 default header behaves the same on various viewport sizes and browsers, and no regressions have been introduced by this change.

#2 @tomjcafferkey
7 months ago

Recently done the same to TT4 which was accepted here https://core.trac.wordpress.org/ticket/60410

#3 @poena
7 months ago

  • Milestone changed from Awaiting Review to 6.6

#4 @poena
6 months ago

Test Report

Description

This report validates whether the indicated patch works as expected.

Patch tested: https://github.com/WordPress/wordpress-develop/pull/6233

Environment

  • WordPress: 6.6-alpha-57778-src
  • PHP: 7.4.30
  • Server: nginx/1.23.1
  • Database: mysqli (Server: 8.0.36 / Client: mysqlnd 7.4.30)
  • Browser: Chrome 123.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Three 1.4
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.1.0

Actual Results

  1. ✅ Issue resolved with patch.

#5 @shailu25
6 months ago

Test Report:

Description:

This Report validates whether the indicated patch works as expected.✅

Patch Tested: https://github.com/WordPress/wordpress-develop/pull/6233

Environment:

WordPress - 6.5.2
OS - Windows
Browser - Chrome
Theme: Twenty Twenty Three
PHP - 8.1.23
Active Plugin - None

Actual Results:

  • Twenty Twenty Three's Default header behaves the same(as before) on Various View port sizes With Patch.✅

Screenshots:

Desktop : https://prnt.sc/iykA20l8X33E
Ipad: https://prnt.sc/F7k5HMc6bPHD
Mobile : https://prnt.sc/CyYrkxq_HHHX

#6 @karmatosed
6 months ago

  • Keywords commit added

Looks good to me, I am going to flag this for commit and follow through with that. Thank you everyone.

#7 @karmatosed
6 months ago

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

In 58034:

Twenty Twenty-Three: Wraps navigation block in row within header template part.

This allows inserting of own blocks into header since the release of the Block Hooks API, specifically after the navigation block.

Props tomjcafferkey, poena, shailu25.
Fixes #60723.

Note: See TracTickets for help on using tickets.