Make WordPress Core

Opened 5 months ago

Closed 3 months ago

#60724 closed defect (bug) (fixed)

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

Reported by: tomjcafferkey's profile tomjcafferkey Owned by: karmatosed's profile karmatosed
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 TT2 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 (8)

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


5 months ago
#2

  • 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/60724

## Testing instructions

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

#3 @poena
4 months ago

  • Milestone changed from Awaiting Review to 6.6

#4 @karmatosed
4 months ago

  • Keywords needs-testing added

Adding needs-testing to get specific testing on view ports as noted in the patch:

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

#5 @shailu25
3 months ago

Test Report

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

Environment:

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

Actual Results:

  • Twenty Twenty Two's Default header behaves the same on Various View port sizes With Patch.✅

Screenshots:

Desktop : https://prnt.sc/Os1a3W1BETzS
Ipad: https://prnt.sc/2xm0atXqAo3e
Mobile : https://prnt.sc/j3Op0z8tTsx6

This ticket was mentioned in Slack in #core-themes by karmatosed. View the logs.


3 months ago

#7 @karmatosed
3 months ago

  • Keywords commit added; needs-testing removed
  • Owner set to karmatosed
  • Status changed from new to assigned

Thank you for the testing and patch. Looks like we can move to commit - thank you everyone.

#8 @karmatosed
3 months ago

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

In 58004:

Twenty Twenty Two: Wraps Navigation block in row.

Now that the Blocks Hooks API is released in 6.4, you might want to insert blocks into header of the theme after the Navigation block. This wraps to allow this.

Props tomjcafferkey, poena, shailu25.
Fixes #60724.

Note: See TracTickets for help on using tickets.