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

Category widget block: Markup structure inconsistent in editor compared to other widgets #12565

Closed
laurelfulford opened this issue Dec 3, 2018 · 2 comments
Assignees
Labels
[Block] Categories Affects the Categories Block

Comments

@laurelfulford
Copy link
Contributor

laurelfulford commented Dec 3, 2018

Describe the bug
In the editor, the Category widget's list is wrapped in an extra div, with the .wp-block-categories class on it:

<div class="wp-block-categories">
	<ul class="wp-block-categories__list wp-block-categories__list-level-0">
		<li>...</li>
	</ul>
</div>

The other widget blocks just have their respective classes (.wp-block-archives, .wp-block-latest-posts, .wp-block-latest-comments) right on the list element:

<ul class="wp-block-archives wp-block-archives-list">	
	<li>...</li>
</ul>
<ul class="wp-block-latest-posts">
	<li>...</li>
</ul>
<ol class="wp-block-latest-comments has-avatars has-dates has-excerpts">
	<li class="wp-block-latest-comments__comment">...</li>
</ol>

This looks to be related to #9411, where this extra div was removed from the front-end.

To Reproduce

  1. In the editor, add a Category block and an archive block (plus any of the other widget blocks).
  2. Examine the markup in the editor.

Expected behavior
That the markup structure on the blocks would be similar in the editor.

Additional context
Recreated in Gutenberg 4.6.1, though it's also there in earlier versions.

@designsimply designsimply added Needs Testing Needs further testing to be confirmed. [Block] Categories Affects the Categories Block labels Dec 4, 2018
@kcalkmc
Copy link

kcalkmc commented Dec 9, 2018

Tested in WP 5.0, Windows 7, Chrome.
no longer in DIV.

wp-issue-12565

@Soean Soean self-assigned this Jan 26, 2019
@youknowriad youknowriad removed the Needs Testing Needs further testing to be confirmed. label Oct 3, 2019
@Mamaduka
Copy link
Member

The issue was fixed via #43666. Props to @t-hamano!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Categories Affects the Categories Block
Projects
None yet
Development

No branches or pull requests

6 participants