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

Details block: Add placeholder attribute #68917

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

shimotmk
Copy link
Contributor

What?

It would be useful to be able to set a placeholder in the summary of Details.
Add a placeholder as shown below.

Similar
#30958
#1891

Testing Instructions

  1. Open a post or page. -->
  2. Insert a Details block. -->
  3. Switch to the code editor and add a placeholer.

example

<!-- wp:details {"placeholder":"summary is here!"} -->
<details class="wp-block-details"><summary></summary><!-- wp:paragraph {"placeholder":"Type / to add a hidden block"} -->
<p></p>
<!-- /wp:paragraph --></details>
<!-- /wp:details -->

Testing Instructions for Keyboard

Screenshots or screencast

Before After
before placeholder

Copy link

github-actions bot commented Jan 28, 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: shimotmk <shimotomoki@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

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

@Mamaduka Mamaduka added [Type] Enhancement A suggestion for improvement. [Block] Details Affects the Details Block - used to display content which can be shown/hidden labels Jan 28, 2025
Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

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

A great addition. Thanks, @shimotmk!

@Mamaduka Mamaduka added the props-bot Adding this label triggers the Props Bot workflow for a PR. label Jan 29, 2025
@github-actions github-actions bot removed the props-bot Adding this label triggers the Props Bot workflow for a PR. label Jan 29, 2025
@Mamaduka Mamaduka changed the title Details block: Add placeholder Details block: Add placeholder attribute Jan 29, 2025
@Mamaduka Mamaduka merged commit ed64574 into WordPress:trunk Jan 29, 2025
72 of 76 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.2 milestone Jan 29, 2025
@shimotmk
Copy link
Contributor Author

@Mamaduka
Thank you again!

@shimotmk shimotmk deleted the add/placeholder-to-details branch January 29, 2025 12:12
Kallyan01 pushed a commit to Kallyan01/gutenberg that referenced this pull request Feb 24, 2025
Co-authored-by: shimotmk <shimotomoki@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Details Affects the Details Block - used to display content which can be shown/hidden [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants