WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.25k stars 4.09k forks source link

Table of contents: "Layout" is not a valid block category #60930

Open carolinan opened 4 months ago

carolinan commented 4 months ago

Description

The block.json schema lists the valid block categories as:

"text",
"media",
"design",
"widgets",
"theme",
"embed"

But the experimental table of content block uses the category "layout" in block.json.

Either this category needs to be updated in the block, or it needs to be added to the schema.

Step-by-step reproduction instructions

View the source of the block.json file.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

colorful-tones commented 4 months ago

I just updated the Issue label for the Table of Content block, because I noticed it did not have the “(experimental)” at the end.

I would say that this block could go under the “text” category.

Probably a terrible idea for maintaining things, but I wonder if an “experimental” category should be added. Then this block and Form block could both get categorized as “experimental.” Again, probably a bad idea.

abhi3315 commented 3 months ago

@carolinan I don't think using the "experimental" category is a good option. Usually, core categories are used to categorize blocks based on their usage in the content. We can change the table of contents category to "text."