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

Latest Post block having spacing issue when we change post content from "Excerpt" to "Full Post" #66412

Open
3 of 6 tasks
viralsampat-multidots opened this issue Oct 24, 2024 · 8 comments · May be fixed by #66442
Open
3 of 6 tasks
Labels
[Block] Latest Posts Affects the Latest Posts Block Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Bug An existing feature does not function as intended

Comments

@viralsampat-multidots
Copy link
Contributor

Description

Hell Team,

I have checked "Latest Post" block and found that there is some spacing issues between "Block Post Title" & "Block Post Content" when we change post content from "Excerpt" to "Full Post". There should some space between post title & post content.

I have checked this into various themes and here I have provided its screenshots.

Thanks,

Step-by-step reproduction instructions

  • Type / to choose a block
  • Select Latest post block
  • Change its post content from "Excerpt" to "Full Post"
  • Save the changes and publish the page.
  • View the editor side & front-end side.

Screenshots, screen recording, code snippet

Screenshots:

Twenty Fourteen:

Image
Image

Twenty Fifteen

Image
Image

Twenty Sixteen

Image
Image

Twenty Seventeen

Image
Image

Environment info

  • WordPress version: WordPress 6.6.2 running,
  • Themes:
    • Twenty Fourteen Version: 4.0
    • Twenty Fifteen Version: 3.8
    • Twenty Sixteen Version: 3.3
    • Twenty Seventeen Version: 3.7
  • Browser: Google Chrome, Version 130.0.6723.58 (Official Build) (arm64)
  • Device:** MacBook Air M1
  • OS: macOS 15.0.1 (24A348)
  • Gutenberg plugin: Version 19.5.0

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@viralsampat-multidots viralsampat-multidots added the [Type] Bug An existing feature does not function as intended label Oct 24, 2024
@ndiego ndiego added [Block] Latest Posts Affects the Latest Posts Block Good First Issue An issue that's suitable for someone looking to contribute for the first time labels Oct 24, 2024
@PARTHVATALIYA
Copy link
Contributor

Hello @viralsampat-multidots, @ndiego , I suggest adding the same CSS to the .wp-block-latest-posts__post-full-content class as we have in the .wp-block-latest-posts__post-excerpt class. This should add consistent spacing between the post title and post content in the latest posts block. I’ve added a diff to resolve this issue; please review it, and if it looks good, I’ll proceed with raising a PR.

diff --git a/packages/block-library/src/latest-posts/style.scss b/packages/block-library/src/latest-posts/style.scss
index 2a01d177ef..e7e90589c1 100644
--- a/packages/block-library/src/latest-posts/style.scss
+++ b/packages/block-library/src/latest-posts/style.scss
@@ -57,7 +57,7 @@
 	font-size: 0.8125em;
 }
 
-.wp-block-latest-posts__post-excerpt {
+.wp-block-latest-posts__post-excerpt, .wp-block-latest-posts__post-full-content {
 	margin-top: 0.5em;
 	margin-bottom: 1em;
 }

@viralsampat-multidots
Copy link
Contributor Author

Hello @ndiego

I have checked above mentioned changes and it looks good. Do you want to add PR or I will make this change and create new PR?

Thanks,

@viralsampat-multidots
Copy link
Contributor Author

Hello @ndiego

I have updated my PR and made above mentioned change.

Thanks,

@ndiego
Copy link
Member

ndiego commented Oct 25, 2024

@viralsampat-multidots can you provide a link to your PR, or link it to this issue?

@viralsampat-multidots
Copy link
Contributor Author

Hello @ndiego

Yes, sure.

Here, I have provided my PR link: #66442

Thanks,

@ankitpanchal75
Copy link

LGTM 👍

@MNZ02
Copy link

MNZ02 commented Nov 1, 2024

Is the issue still open? If yes, can I work on it?

@patil-vipul
Copy link

As there was no activity on previous PR, I've added the change here #66740

Thanks 🙇

@up1512001 up1512001 linked a pull request Nov 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Latest Posts Affects the Latest Posts Block Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants