Skip to content

Latest Posts: Update content display labels to Display post content and Content length #69839

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

Merged

Conversation

himanshupathak95
Copy link
Contributor

@himanshupathak95 himanshupathak95 commented Apr 6, 2025

What?

Closes #69838

Updates the Latest Posts block to use more descriptive and consistent labels for post content display options.

Why?

The previous labels ("Show", "Post content") were ambiguous and inconsistent, which could confuse users and translators. This PR improves clarity and accessibility by using explicit labels like "Display post content" and "Content length".

How?

  • Changed the ToggleControl and ToolsPanelItem label from Post content to Display post content.

  • Updated the label for the content length selection from Show to Content length in both ToolsPanelItem and RadioControl.

Testing Instructions

  • Add a Latest Posts block to a post or page in the block editor.
  • In the block settings sidebar, look for the toggle labeled "Display post content".
  • Enable the toggle and observe the "Content length" control for selecting Excerpt or Full post.
  • Verify that all labels are updated and consistent, even in the ToolsPanel.

Screenshots

Before After
Screenshot 2025-04-22 at 12 44 45 Screenshot 2025-04-22 at 12 44 15

@himanshupathak95 himanshupathak95 marked this pull request as ready for review April 6, 2025 15:29
Copy link

github-actions bot commented Apr 6, 2025

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core, Gutenberg Plugin.
  • Labels found: .

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

Copy link

github-actions bot commented Apr 6, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: carolinan <poena@git.wordpress.org>
Co-authored-by: timse201 <timse201@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Block] Latest Posts Affects the Latest Posts Block l10n Localization and translations best practices [Type] Bug An existing feature does not function as intended labels Apr 7, 2025
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

I would like to question whether the label "Show" is appropriate here in the first place. It seems too abstract to me:

image

I'd prefer to change the label to be more specific rather than adding the context. For example, "Content type":

image

cc @WordPress/gutenberg-design

@carolinan
Copy link
Contributor

Maybe "Content length" ?

@t-hamano
Copy link
Contributor

Maybe "Content length" ?

Personally, I don't mind either wording. Furthermore, I think the "Post content" toggle should be improved to "Display post content". Example:

image

@himanshupathak95 himanshupathak95 force-pushed the fix/69838-show-translation-context branch from 714516a to ece42ae Compare April 21, 2025 09:27
@himanshupathak95 himanshupathak95 changed the title Latest Posts: Add context to 'Show' translation string Latest Posts: Add context to Show translation string Apr 21, 2025
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

Thanks for the update! Could you update the PR title and content according to the latest changes?

@himanshupathak95 himanshupathak95 changed the title Latest Posts: Add context to Show translation string Latest Posts: Improve labels for content display options Apr 22, 2025
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

LGTM!

Could you update the PR title and content according to the latest changes?

Please review the above points, as this will make it easier for others to understand what this PR actually did when they come across it later.

@himanshupathak95 himanshupathak95 changed the title Latest Posts: Improve labels for content display options Latest Posts: Update content display labels to Display post content and Content length Apr 22, 2025
@t-hamano t-hamano merged commit 4974457 into WordPress:trunk Apr 22, 2025
61 checks passed
@himanshupathak95 himanshupathak95 deleted the fix/69838-show-translation-context branch April 22, 2025 07:31
@github-actions github-actions bot added this to the Gutenberg 20.8 milestone Apr 22, 2025
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
… and `Content length` (WordPress#69839)

* Latest Posts: Add context to 'Show' translation string

* Latest Posts: Improve labels to be more descriptive

* Latest Posts: Update the lable 'Show' to 'Content length'

* Latest Posts: Update the ToolsPanelItem label to ensure consistency

Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: carolinan <poena@git.wordpress.org>
Co-authored-by: timse201 <timse201@git.wordpress.org>
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 l10n Localization and translations best practices [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move 'Show' to a translation string with gettext context
3 participants