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

[Polish] Remove blocks from default menu #58

Closed
stephaniefois opened this issue May 13, 2024 · 2 comments
Closed

[Polish] Remove blocks from default menu #58

stephaniefois opened this issue May 13, 2024 · 2 comments
Assignees

Comments

@stephaniefois
Copy link
Contributor

stephaniefois commented May 13, 2024

There are many core blocks that likely will seldom, if ever, get used on projects that Viget designs. There are also blocks that, while useful in capable and responsible hands, might be the type of blocks that can go awry if we have not taken the time to define style and usage principles; for those reasons, I am suggesting those types of blocks be removed from our stater site theme.

In my opinion, these are all the core blocks I think should be hidden from the user:

  • Classic
  • Details
  • Preformatted
  • Verse
  • Gallery
  • Audio
  • Cover
  • Media and text
  • Video
  • More
  • Page Break
  • Archives
  • Calendar
  • RSS
  • Custom HTML
  • Latest Comments
  • Latest Posts
@bd-viget
Copy link
Contributor

Hey @stephaniefois, so I frustratingly had a bug in my code and just figured out the solution, so I've about to create a PR for this ticket, however, I noticed that when we disable some of the core blocks that we're using in our components or patterns, they do not populate when creating a new component. Existing instances of components using the blocks that have been removed still work fine (for example, the Media Text block inside the Text & Image block). So it appears we will need to keep any blocks in the inserter that we plan on using anywhere on the site.

There may be an alternative JS solution using some of the block hooks/filters, but I didn't want to spend too much time on this, and may be something we can circle back to.

The blocks in the list that I couldn't remove are:

  • Details (used in the Accordion component)
  • Media and Text (used in the Text & Image component)
  • Video (used in the Video Embed component)

Some other considerations might be:

  • Gallery - This is not used in any components, but feels like it should probably be one of our pre-styled core components and seems like it could be useful on most projects.
  • Classic - When content is migrated from legacy WordPress Sites or imported via WP All Import, it is usually placed in the Classic Editor block, and can be converted to traditional blocks later. I'm not sure if removing it would cause an issue here, but wanted to bring it up.
  • Cover - This is a great block used for Heroes and supports Image & Video backgrounds, so it might be worth keeping around as well (or creating our own component using it)

Let me know your thoughts!

@stephaniefois
Copy link
Contributor Author

Let's leave all the blocks you touched on in then; your reasoning makes sense to me!

bd-viget added a commit that referenced this issue May 17, 2024
* [#58] Disable specific blocks.

* [N/A] Update ACF

* [#58] Fixed bug with block removal, sorted blocks

* [#58] Included Classic, Cover & Gallery blocks per ticket discussion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants