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

Related posts block - updated margin to make full-width #13839

Merged
merged 1 commit into from
Oct 28, 2019

Conversation

MichaelArestad
Copy link
Contributor

I noticed that the Related Posts block is indented 10px on the left and right side of whatever column it resides in. I added some negative margins as a quick hack to resolve this. In theory, now the column will line up.

Changes proposed in this Pull Request:

  • Added some egative margin to account for list spacing of the grid view of the Related posts.

Is this a new feature or does it add/remove features to an existing part of Jetpack?

  • Enhancement to existing feature

Before

image

After

image

Testing instructions:

Note: There is some additional margin added by the theme. This is taken care of in #13516

  • Go to post-new.php
  • Add the Related Posts block into your post content
  • Make sure it aligns with the width of the block (it looks like due to the width calculations only going to 99% in the original, it will be a couple pixels shy of full width, but that's okay.

Proposed changelog entry for your changes:

  • No changelog needed

@MichaelArestad MichaelArestad added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Related Posts [Status] Needs Review To request a review from Crew. Label will be renamed soon. [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack labels Oct 25, 2019
@MichaelArestad MichaelArestad added this to the 7.9 milestone Oct 25, 2019
@MichaelArestad MichaelArestad requested a review from a team as a code owner October 25, 2019 18:44
@MichaelArestad MichaelArestad self-assigned this Oct 25, 2019
@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello MichaelArestad! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer, review, and approve D34553-code before merging this PR. Thank you!

@jetpackbot
Copy link

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Scheduled Jetpack release: November 5, 2019.
Scheduled code freeze: October 29, 2019

Generated by 🚫 dangerJS against dc231ae

@jeherve
Copy link
Member

jeherve commented Oct 25, 2019

Is this needed for every theme out there? If so, where are the 10px added in the first place? Is that some CSS we could remove in Jetpack?

@jeherve jeherve added [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Oct 25, 2019
@MichaelArestad
Copy link
Contributor Author

@jeherve It is needed for every theme. The 10px margin is on each Related Post Item applied to both left and right sides which puts some needed space between them. This simple aligns the outer edges correctly no matter the number of items in the grid.

@MichaelArestad MichaelArestad added [Status] Needs Review To request a review from Crew. Label will be renamed soon. and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Oct 25, 2019
@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Oct 28, 2019
@jeherve jeherve merged commit a986be3 into master Oct 28, 2019
@jeherve jeherve deleted the update/related-posts-block-margin branch October 28, 2019 17:03
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Related Posts [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack Touches WP.com Files [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants