Skip to content
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

Add alignment for latest posts block #1803

Merged
merged 6 commits into from Jul 10, 2017
Merged

Conversation

westonruter
Copy link
Member

Adds alignment controls:

image

Also fixes margin/padding of Latest Posts block in editor and frontend.

Replaces #1183.
See #1011.

@ellatrix
Copy link
Member

ellatrix commented Jul 8, 2017

Could we add the alignment on the block itself for consistency? cc @jasmussen

@jasmussen
Copy link
Contributor

Could we add the alignment on the block itself for consistency?

Yes I think we should, especially since it doesn't have much of a toolbar to begin with.

@westonruter
Copy link
Member Author

@jasmussen ok, so then should the widget block mocks be updated to always have the alignment toolbar with the block instead of the inspector? /cc @melchoyce

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 089d62d on add/latest-posts-alignment-2 into ** on master**.

@@ -43,8 +48,10 @@ function gutenberg_render_block_core_latest_posts( $attributes ) {
$posts_content .= "<li><a href='{$post_permalink}'>{$post_title}</a></li>\n";
}

$class = 'blocks-latest-posts ' . esc_attr( 'align' . $align );
Copy link
Contributor

Choose a reason for hiding this comment

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

We should follow the same convention as the frontend blocks to generate the classname. This should be wp-block-latest-posts

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 293a84f on add/latest-posts-alignment-2 into ** on master**.

This was referenced Jul 9, 2017
@jasmussen
Copy link
Contributor

Looks, works great! 👍 👍

@westonruter
Copy link
Member Author

So ✅ to merge?

@jasmussen
Copy link
Contributor

Yup!

@westonruter westonruter merged commit 08cab89 into master Jul 10, 2017
@westonruter westonruter deleted the add/latest-posts-alignment-2 branch July 10, 2017 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants