-
Notifications
You must be signed in to change notification settings - Fork 800
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
Calendly Block: Add alignment options #14403
Conversation
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: January 23, 2020. |
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.
I wonder if we could simplify this and only do this:
https://github.com/Automattic/jetpack/blob/fix/14367/extensions/blocks/calendly/index.js#L31
We would then let all the styling to the themes, since Jetpack_Gutenberg::block_classes
handles adding the necessary classes to the container around the block when you pick an alignment:
$classes = Jetpack_Gutenberg::block_classes( 'calendly', $attr ); |
@@ -11,6 +11,9 @@ const colourValidator = value => hexRegex.test( value ); | |||
const urlValidator = url => ! url || url.startsWith( 'https://calendly.com/' ); | |||
|
|||
export default { | |||
align: { |
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.
I don't know if we need this, since we don't set a default value.
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 do, without it, the alignment attribute doesn't work.
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.
Actually I checked this again, and you're right we don't need it. I've removed it.
I'm happy to not add the additonal CSS but I'm not sure if that's very useful. I'd be curious to get feedback from someone on core. |
Caution: This PR has changes that must be merged to WordPress.com |
I removed the wide alignment options |
scruffian, Your synced wpcom patch D37949-code has been updated. |
r201955-wpcom |
Fixes #14367
Changes proposed in this Pull Request:
Testing instructions:
Proposed changelog entry for your changes: