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

Add simple container block to wrap smaller elements in block-based themes #20376

Closed
Netzberufler opened this issue Feb 22, 2020 · 3 comments
Closed
Labels
[Block] Group Affects the Group Block [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing")

Comments

@Netzberufler
Copy link

I have experimented with Full Site Editing and turned an existing theme with PHP templates in a block-based WordPress theme.

There were multiple times where I had the need to wrap some elements. While the Group block works fine with larger sections it felt a bit much for wrapping smaller elements like the post date and author:

It would have quickly turned into this to achieve the same structure as in the PHP version:

<!-- wp:group {"className":"entry-meta"} -->
<div class="wp-block-group entry-meta">
	<div class="wp-block-group__inner-container">

		<!-- wp:group {"className":"entry-date"} -->
		<div class="wp-block-group entry-date">
			<div class="wp-block-group__inner-container">

				<!-- wp:post-date /-->

			</div>
		</div>
		<!-- /wp:group -->

		<!-- wp:group {"className":"entry-author"} -->
		<div class="wp-block-group entry-author">
			<div class="wp-block-group__inner-container">

				<!-- wp:post-author /-->

			</div>
		</div>
		<!-- /wp:group -->

	</div>
</div>
<!-- /wp:group -->

The Group block generates a lot of HTML markup and often you also don't need the full range of settings like aligment and colors (and probably more to come) for each and every element.

So I wish there was a simple container / wrapping block for this, with less HTML markup and without any settings. Maybe users are able to transform it to a full Group block if they want adjust colors or make any changes. And it should allow semantic tags (related to #20200)

@mtias
Copy link
Member

mtias commented Feb 24, 2020

I think the inner container of the group block should be optional.

@carolinan
Copy link
Contributor

In block themes, there is no longer an inner container for the group block.

@Netzberufler What types of settings do you think are missing from the post blocks (date, terms, author etc) for you to not have to use the wrapper?

@annezazu annezazu added [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") and removed [Feature] Full Site Editing labels Jul 24, 2023
@jordesign
Copy link
Contributor

With no longer input on this issue in almost 2 years, and the increased maturity of the Block Editor - I'm going to close this issue.

@jordesign jordesign closed this as not planned Won't fix, can't repro, duplicate, stale Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Group Affects the Group Block [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing")
Projects
None yet
Development

No branches or pull requests

7 participants