-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Accordion Panel: Remove unnecessary wrapper div and simplify save #71454
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
Accordion Panel: Remove unnecessary wrapper div and simplify save #71454
Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
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.
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. |
t-hamano
left a comment
There was a problem hiding this 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! Can you update the Edit component as well as the save function?
78d584b to
dacc60f
Compare
t-hamano
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Nice cleanup 👍
What?
Closes #71436
Removes the unnecessary
accordion-content__wrapperdiv from the Accordion Panel block and simplifies the edit and save function.Why?
The Accordion Panel block was generating redundant HTML markup with an extra wrapper div that served no functional purpose. There was also some complexity with the save function, with manual styling extraction.
How?
Replaced manual styling extraction with the standard
useBlockProps.save()pattern that automatically handles all declared block supports (color, spacing, border, typography, shadow).Testing Instructions
Screencasts
Before
Screen.Recording.2025-09-01.at.23.27.38.mp4
After
Screen.Recording.2025-09-01.at.23.22.28.mp4