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

FSE: Header template part has extraneous UI for group block #34887

Closed
shaunandrews opened this issue Jul 25, 2019 · 4 comments · Fixed by #34997
Closed

FSE: Header template part has extraneous UI for group block #34887

shaunandrews opened this issue Jul 25, 2019 · 4 comments · Fixed by #34997

Comments

@shaunandrews
Copy link
Contributor

shaunandrews commented Jul 25, 2019

Our current Header template part uses a Group block to contain all the elements in the Header.

image

This adds an extra click to edit anything in the Header, which creates some confusion. Also, the settings for the Group block allow a customer to add a background color which "breaks" the design.

image

There's also the ability to add a new block outside of this group using the default inserter.

image

Doing so will break the layout of the site.

I suggest we remove the ability to interact with the parent Group block. That is, a customer should not be able to focus the Group block, nor update its settings in the sidebar. There's also an extra inserter button that appears at the bottom-left of the Group block — we should also remove this.

Similar, we should remove the ability to add blocks outside of this Group block.

@shaunandrews
Copy link
Contributor Author

Turns out once you interact with that inserter below the Group block its impossible to remove it. I now have an empty placeholder in my site's header:

image

@gwwar
Copy link
Contributor

gwwar commented Jul 29, 2019

I suggest we remove the ability to interact with the parent Group block.

This likely needs to be specific to the theme/header content. Folks may want to look into the Gutenberg template block API, where we can lock down specific elements.

https://developer.wordpress.org/block-editor/developers/block-api/block-templates/#locking

How blocking is this @shaunandrews ?

@apeatling
Copy link
Member

The only reason we need the group block is to apply the css classes that the theme needs. If we can find a way to apply the class names without the group block, that might be the easiest direction.

@shaunandrews
Copy link
Contributor Author

Here's a related Gute issue mentioning the need for this same functionality: WordPress/gutenberg#7469

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants