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 Posts block] Option to always show the [Read more ...] #51213

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

ghorivipul97
Copy link
Contributor

link #22269

What?

Added Read More Link in Latest Post Block

Why?

#22269

How?

  • Add Read More link in Latest Post Block

Testing Instructions

  • Create Post and Add Excerpt Words
  • Go to Page
  • Select "Latest Post" Block
  • if Post Content option Enable then show Excerpt with Read more link

Testing Instructions for Keyboard

Screenshots or screencast

image

@ghorivipul97 ghorivipul97 requested a review from ajitbohra as a code owner June 3, 2023 09:59
@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Jun 3, 2023
@github-actions
Copy link

github-actions bot commented Jun 3, 2023

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @ghorivipul97! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

Copy link
Contributor

@alexstine alexstine left a comment

Choose a reason for hiding this comment

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

@ghorivipul97 Just a couple quick suggestions below.

packages/block-library/src/latest-posts/edit.js Outdated Show resolved Hide resolved
packages/block-library/src/latest-posts/index.php Outdated Show resolved Hide resolved
packages/block-library/src/latest-posts/index.php Outdated Show resolved Hide resolved
Copy link
Contributor Author

@ghorivipul97 ghorivipul97 left a comment

Choose a reason for hiding this comment

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

Fixed Suggestion

@skorasaurus skorasaurus added the [Block] Latest Posts Affects the Latest Posts Block label Jun 5, 2023
Copy link
Contributor

@alexstine alexstine left a comment

Choose a reason for hiding this comment

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

@ghorivipul97 Looks like PHP checks are also failing. Left a couple suggested code changes below.

packages/block-library/src/latest-posts/index.php Outdated Show resolved Hide resolved
packages/block-library/src/latest-posts/index.php Outdated Show resolved Hide resolved
packages/block-library/src/latest-posts/index.php Outdated Show resolved Hide resolved
@ghorivipul97 ghorivipul97 force-pushed the update/latest_post_read_more branch 2 times, most recently from 7a535f4 to 3db3e4c Compare June 9, 2023 19:58
@ghorivipul97 ghorivipul97 reopened this Jun 9, 2023
@ghorivipul97
Copy link
Contributor Author

@alexstine can you help me to solve "puppeteer" error

@alexstine alexstine requested a review from carolinan July 4, 2023 04:19
@carolinan
Copy link
Contributor

@ghorivipul97 Hi. You need to pull the latest changes from the trunk branch and update the pull request, then the tests will run again.

Kindly try to solve the PHP errors.

.trim()
.split( ' ', excerptLength )
.join( ' ' ) }
{ /* translators: excerpt truncation character, default … */ }
Copy link
Contributor

Choose a reason for hiding this comment

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

The ellipsis is not used anymore so the translators comment should be removed.

@carolinan
Copy link
Contributor

I also think that read more link should always be on a separate line, what do you think? And maybe there needs to be some spacing added between the list items. Right now, the link is displayed differently in the editor and the front.

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 First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants