Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Try new navigation block markup #260

Merged
merged 4 commits into from
Nov 23, 2021
Merged

Conversation

kjellr
Copy link
Collaborator

@kjellr kjellr commented Nov 22, 2021

Closes #230.

Swaps out our existing navigation block markup to use layout attributes, and to remove isResponsive (that is now enabled by default, so there's no need for us to declare it).

While doing this, I realized that the header-centered-logo pattern did not have a page list block inside of it like all of the others. So I added that in too.

To test, just make sure all patterns appear like they did before, and also show no markup errors.

@@ -6,7 +6,9 @@
'title' => __( 'Simple dark about page', 'twentytwentytwo' ),
'categories' => array( 'twentytwentytwo-pages' ),
'content' => '<!-- wp:cover {"overlayColor":"foreground","minHeight":100,"minHeightUnit":"vh","contentPosition":"center center","align":"full","style":{"spacing":{"padding":{"top":"max(1.25rem, 8vw)","right":"max(1.25rem, 8vw)","bottom":"max(1.25rem, 8vw)","left":"max(1.25rem, 8vw)"}}}} -->
<div class="wp-block-cover alignfull has-foreground-background-color has-background-dim" style="padding-top:max(1.25rem, 8vw);padding-right:max(1.25rem, 8vw);padding-bottom:max(1.25rem, 8vw);padding-left:max(1.25rem, 8vw);min-height:100vh"><div class="wp-block-cover__inner-container"><!-- wp:navigation {"itemsJustification":"right","overlayMenu":"always"} -->
<div class="wp-block-cover alignfull has-foreground-background-color has-background-dim" style="padding-top:max(1.25rem, 8vw);padding-right:max(1.25rem, 8vw);padding-bottom:max(1.25rem, 8vw);padding-left:max(1.25rem, 8vw);min-height:100vh"><div class="wp-block-cover__inner-container"><!-- wp:navigation {"layout":{"type":"flex","setCascadingProperties":true,"justifyContent":"right"},"overlayMenu":"always"} -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting a block validation error on this one, it looks like there are two wp:navigation blocks declared in the markup.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — mind the-testing that one?

@kjellr kjellr merged commit 2018bcd into trunk Nov 23, 2021
@kjellr kjellr deleted the try/new-navigation-block-markup branch November 23, 2021 17:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Navigation block in templates to use layout attributes
2 participants