-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
What
The Design panel should display available navigation overlay patterns when editing navigation overlay template parts, but it's missing entirely. Only the "Content" section appears. This works correctly for headers and footers.
The patterns exist in lib/overlay-patterns.php and work via the block inserter, but they're filtered out from the Design panel.
Why
Navigation overlays are shipping in WordPress 7.0, and pattern discovery is essential for adoption. Without the Design panel, users can't easily discover available patterns, creating an inconsistent experience compared to other template parts.
This broke during experiment stabilization (#74968) when overlay patterns were assigned 'source' => 'core'. Since September 2023, patterns with source: 'core' are excluded from template part Design panels. This collision wasn't caught because no tests cover this scenario.
How
Navigation overlay patterns are marked 'source' => 'core' in lib/overlay-patterns.php, causing EXCLUDED_PATTERN_SOURCES to filter them. Possible approaches:
Adjust the source attribute
- Change to
'source' => 'plugin'or remove it entirely - Needs coordination between Gutenberg and Core 7.0
Refine the filtering logic
- Special-case overlay patterns in
filterOutExcludedPatternSources - Consider exempting template-part-specific patterns
Input welcome from folks familiar with the pattern system.
User Stories
As a site builder, I want to see available navigation overlay patterns in the Design panel, so I can easily browse and select an overlay design.
As a theme author, I want the overlay editing experience to match headers and footers, so users understand how to customize template parts consistently.
Technical Context
Reproduction:
- Site Editor → Patterns → Template Parts
- Create template part with area "Navigation Overlay"
- Check sidebar - Design panel is missing
Root cause: When stabilized, patterns changed from no source to `'source' => 'core'`:
// Before
register_block_pattern('gutenberg/navigation-overlay', [
'blockTypes' => ['core/template-part/navigation-overlay'],
]);
// After - triggers filtering
register_block_pattern('core/navigation-overlay', [
'blockTypes' => ['core/template-part/navigation-overlay'],
'source' => 'core',
]);Scope: Gutenberg trunk + WordPress Core 7.0 (backported via wordpress-develop#10844)
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackProjects
Status