close
Skip to content

Separator: Surfacing the HTML markup control#70455

Merged
t-hamano merged 3 commits intoWordPress:trunkfrom
Infinite-Null:html-markup-control
Jul 11, 2025
Merged

Separator: Surfacing the HTML markup control#70455
t-hamano merged 3 commits intoWordPress:trunkfrom
Infinite-Null:html-markup-control

Conversation

@Infinite-Null
Copy link
Contributor

@Infinite-Null Infinite-Null commented Jun 17, 2025

What?

Closes #70441

Reverts the HTML element control in the Separator block back to the Advanced Inspector panel to restore consistent UI patterns and improve overall usability.

Why?

In PR #70185, the HTML element control was moved from the Advanced Inspector to the top-level Settings panel to improve accessibility. However, this change created a significant usability regression.

How?

This PR reverts the UI changes from #70185 by:

  • Moving the HtmlElementControl back to InspectorAdvancedControls
  • Keeping the helpful control itself (just moving its location)

Testing Instructions

  1. Open the WordPress block editor (post or page)
  2. Insert a Separator block
  3. Open the block settings in the sidebar
  4. Click on the "Advanced" section at the bottom of the inspector
  5. Verify that the "HTML element" control is present and functional
  6. Test changing between <hr> and <div> options
  7. Confirm the separator renders with the correct HTML element in both editor and frontend

Screenshots or screencast

Before (Current) After (This PR)
image image

@Infinite-Null Infinite-Null changed the title [WIP] Separator: Surfacing the HTML markup control Separator: Surfacing the HTML markup control Jun 18, 2025
@Infinite-Null Infinite-Null marked this pull request as ready for review June 18, 2025 10:46
@github-actions
Copy link

github-actions bot commented Jun 18, 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: Infinite-Null <ankitkumarshah@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: karmatosed <karmatosed@git.wordpress.org>
Co-authored-by: amberhinds <alh0319@git.wordpress.org>
Co-authored-by: joedolson <joedolson@git.wordpress.org>
Co-authored-by: carolinan <poena@git.wordpress.org>
Co-authored-by: fabiankaegy <fabiankaegy@git.wordpress.org>

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

@Infinite-Null
Copy link
Contributor Author

Hi @t-hamano, I have reverted the changes and moved HTML element control to the Inspector advanced section. Please review it at your convenience.

@fabiankaegy fabiankaegy requested a review from t-hamano June 18, 2025 12:58
@fabiankaegy fabiankaegy added [Type] Regression Related to a regression in the latest release [Block] Separator Affects the Separator Block labels Jun 18, 2025
</ToolsPanelItem>
</ToolsPanel>
) }
<InspectorControls group="advanced">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

While we could also use InspectorAdvancedControls to achieve the same result, I followed the approach used in the previous PR and implemented it using InspectorControls for consistency. Happy to adjust if there’s a preference for a different approach.

Copy link
Contributor

Choose a reason for hiding this comment

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

Either way is fine since they have the same meaning, but it appears that InspectorAdvancedControls exists for backward compatibility. Therefore, the current approach of using InspectorControls seems to be fine.

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 support this PR, but I want to avoid moving the UI multiple times due to disagreements, as this creates cognitive load for users. Let's take a moment and wait for the additional feedback.

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.

As discussion is still ongoing on #70441, let's pause moving forward with this PR.

@t-hamano t-hamano dismissed their stale review July 11, 2025 10:09

After much thought, let's merge this PR for now. See #70441 (comment)

@t-hamano t-hamano merged commit 5b19ab0 into WordPress:trunk Jul 11, 2025
72 of 77 checks passed
@github-actions github-actions bot added this to the Gutenberg 21.3 milestone Jul 11, 2025
cbravobernal pushed a commit that referenced this pull request Jul 15, 2025
* Refactor: Simplify InspectorControls structure and add InspectorAdvancedControls for HTML element selection

* Refactor: Remove unused InspectorControls and related components from SeparatorEdit

* Refactor: Replace InspectorAdvancedControls with InspectorControls for consistency

Co-authored-by: Infinite-Null <ankitkumarshah@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: karmatosed <karmatosed@git.wordpress.org>
Co-authored-by: amberhinds <alh0319@git.wordpress.org>
Co-authored-by: joedolson <joedolson@git.wordpress.org>
Co-authored-by: carolinan <poena@git.wordpress.org>
Co-authored-by: fabiankaegy <fabiankaegy@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Separator Affects the Separator Block [Type] Regression Related to a regression in the latest release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Find alternative solutions for surfacing the HTML markup control in the Separator block

3 participants