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

Renaming the new "Section" block to "Group" #14898

Closed
mtias opened this issue Apr 10, 2019 · 9 comments

Comments

Projects
None yet
8 participants
@mtias
Copy link
Contributor

commented Apr 10, 2019

Coming a bit late to the conversation around the new Section block (#13964). I don't like to resurface things that have already reached a consensus, however, I think the name for this block needs to change for a few reasons:

  • I agree with the concerns raised before about the confusion with the semantic nature of the HTML5 element. Even without that potential confusion, “creating a section” carries a bit more weight than "creating a group" for stylistic purposes, and I think this block conflates the two.
  • Once actual page sections start to appear to power other areas of the site/theme (headers, navigation, featured stories, sidebars, footers, and so on) it might lead to yet more semantic overlap.
  • People might not know when it is appropriate to add a section or not, and what implications it might have for their content structure. It should be fine to add a group within a Column and so on without hesitating as to whether a section is called for.

I'd propose calling this block Group instead, which seems more straightforward and less loaded as a term. (In the future, there'd be space for supporting specific HTML tags for the containing element, and converting a Group to a proper Section seems like a meaningful path.)


Finally, I'd strongly suggest incorporating a way to select multiple blocks and grouping them by using the block transformation tool — select a few blocks → open transformations → choose the "Group" block.

I believe it can be a more natural pattern for people to first create their content, then group it, rather than start with an empty container first.

@youknowriad

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2019

Thanks for raising this. The arguments here make sense to me, especially if we add the "Group/Ungroup" actions.

@mapk

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2019

I'm also good with "Group" as the name.

Finally, I'd strongly suggest incorporating a way to select multiple blocks and grouping them by using the block transformation tool

Would love to see a PR for this!

@getdave

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2019

I agree with your logic here and wish I'd been as articulate in my responses when I was pushing back on "Section" in the original PR.

a way to select multiple blocks and grouping them by using the block transformation tool

Definitely a great feature and one which was requested during the work on the Block but felt to be out of scope. I would love to see this happen.

Also note if the name is updated we need to update the Github label (see below)
Screen Shot 2019-04-10 at 14 42 14

@marekhrabe

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2019

add the "Group/Ungroup" actions

Raises a question whether this would be a single block feature of Group or if we can build this on a framework level so all blocks with InnerBlocks can be used for wrapping. Either opt-in (like supports: { wrapping: true }) or maybe just the presence of InnerBlocks could be enough signal.

@talldan

This comment has been minimized.

Copy link
Contributor

commented Apr 11, 2019

Raises a question whether this would be a single block feature of Group or if we can build this on a framework level so all blocks with InnerBlocks can be used for wrapping. Either opt-in (like supports: { wrapping: true }) or maybe just the presence of InnerBlocks could be enough signal.

I was thinking about that as well. There were a few constraints I could think of. Firstly, I'm not sure if it is possible to determine that a block supports inner blocks from its blockType. Also, there are some blocks using a templated inner blocks with a locked template, or there's columns which only accepts a column as a child.

It seems like a supports option might be the only way to go.

Alternatively a mapping function like transforms use.

@talldan talldan referenced this issue Apr 11, 2019

Merged

Rename section block to group #14920

5 of 5 tasks complete
@talldan

This comment has been minimized.

Copy link
Contributor

commented Apr 11, 2019

PR here 👉 #14920

@torounit

This comment has been minimized.

Copy link
Contributor

commented Apr 11, 2019

The block is s no longer section. Need support anchor ?

@talldan

This comment has been minimized.

Copy link
Contributor

commented Apr 11, 2019

The block is s no longer section. Need support anchor ?

It should still support the anchor after the rename 👍

@aduth aduth closed this in #14920 Apr 11, 2019

@aduth

This comment has been minimized.

Copy link
Member

commented Apr 11, 2019

Also note if the name is updated we need to update the Github label (see below)

I updated the label name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.