Add a test theme for the Nav Overlay#263
Conversation
Preview changesI've detected changes to the following themes in this PR: Overlay test. You can preview these changes by following the links below: I will update this comment with the latest preview links as you push more changes to this PR. |
| @@ -0,0 +1 @@ | |||
| <!-- wp:pattern {"slug":"overlay-test/overlay-1"} /--> | |||
There was a problem hiding this comment.
This is not showing up yet as the default overlay, it's expecting a user created one
There was a problem hiding this comment.
Even if it did, would we a way to get the parent navigation block it's assigned to? Maybe in the render we'd know to grab the parent navigation if this is the templating style?
There was a problem hiding this comment.
@getdave it's just a one liner but this is ok, we do this often. The template part invokes the pattern
There was a problem hiding this comment.
Yes it's a good approach and keeps things DRY.
| * Title: Navigation Overlay 1 | ||
| * Slug: overlay-test/overlay-1 | ||
| * Categories: navigation | ||
| * Block Types: core/template-part/overlay |
There was a problem hiding this comment.
This line is what makes it show on the right sidebar
There was a problem hiding this comment.
@getdave this will be the pattern we show on the theme's tempalte part
| <!-- wp:heading --> | ||
| <h2 class="wp-block-heading">This is the default Overlay for this theme</h2> | ||
| <!-- /wp:heading --> | ||
| <!-- wp:navigation {"layout":{"type":"flex","orientation":"vertical"}} /--></div> |
There was a problem hiding this comment.
The Nav block will show the same as what the header nav block shows
| </div> | ||
| <!-- /wp:group --> | ||
|
|
||
| <!-- wp:navigation {"overlay":"navigation-overlay"} /--> |
There was a problem hiding this comment.
@getdave this is the key change, we are telling the nav block to use a particular overlay that we have defined before
| "name": "footer" | ||
| }, | ||
| { | ||
| "area": "navigation-overlay", |
There was a problem hiding this comment.
@getdave we also need to register the template part here, like we do header and footer
Do NOT merge
This is a test theme to test the new overlay feature. Best tested with WordPress/gutenberg#74069 checked out. The theme is just a blank empty theme with the following changes: