-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quadrat: Add Join pattern #3745
Conversation
} | ||
} | ||
endif; | ||
|
||
add_action( 'after_setup_theme', 'quadrat_register_block_patterns', 12 ); | ||
add_action( 'init', 'quadrat_register_block_patterns' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is needed so that the blocks are registered when we register the patterns. The problem is it moves Quadrat to the bottom of the patterns list drop down.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I see. I wonder if we can re-order the list somehow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense and looks good considering the upstream changes that should happen.
My only comment is maybe the pattern should be alignwide by default?
} | ||
} | ||
endif; | ||
|
||
add_action( 'after_setup_theme', 'quadrat_register_block_patterns', 12 ); | ||
add_action( 'init', 'quadrat_register_block_patterns' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I see. I wonder if we can re-order the list somehow?
8f7c006
to
f3be992
Compare
We can get it higher in the list: @kjellr do you have a preference for where this should go? |
9d1944c
to
628f691
Compare
quadrat/sass/theme.scss
Outdated
|
||
.subscription-column { | ||
text-align: right; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be inside this folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense and looks good considering the upstream changes that should happen.
+1
Theme patterns generally show up at the top of the list, so if we can do that I think that's the best route. (I haven't tested this PR yet, so it's possible you're already doing that now). |
@@ -28,15 +27,18 @@ function quadrat_register_block_patterns() { | |||
'listen-to-the-podcast', | |||
); | |||
|
|||
if ( class_exists( 'WP_Block_Type_Registry' ) && \WP_Block_Type_Registry::get_instance()->is_registered( 'jetpack/subscriptions' ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should update the wpcom-only patterns in Blank Canvas to use this method, rather than loading them in their own separate wpcom.php
file.
Changes proposed in this Pull Request:
Adds a "Join" pattern.
To test you need Jetpack installed and running on a custom domain, to make the subscription block work. It might be easier to test on a simple site.
Note: The button / input on the subscription form doesn't match the theme. This is because of this issue:Automattic/jetpack#17590
It would also be really good to get this done so we don't need the custom CSS: WordPress/gutenberg#31459
Related issue(s):
#3642