-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Editor: Organize editor inserter menu in user friendly way #35876
Comments
From a technical point of view, we can customize the categories in WP.com with the current tools available in Gutenberg: import { getCategories, setCategories } from '@wordpress/blocks';
import { __, sprintf } from '@wordpress/i18n';
import { addFilter } from '@wordpress/hooks';
const changeBlocksCategories = ( settings, name ) => {
if ( 'coblocks' === settings.category ) {
settings.category = 'common';
}
if ( 'coblocks-gallery' === settings.category ) {
settings.category = 'wpcom-category-1';
}
if ( 'jetpack' === settings.category ) {
settings.category = 'wpcom-category-2';
}
return settings.
} );
addFilter( 'blocks.registerBlockType', 'wpcom/categories', changeBlocksCategories );
setCategories( [
{
slug: 'wpcom-category-1',
title: 'Custom WP.com category 1',
icon: <svg>...</svg>,
},
{
slug: 'wpcom-category-2',
title: 'Custom WP.com category 2',
icon: <svg>...</svg>,
},
...getCategories().filter( ( { slug } ) => ! [ 'coblocks-galleries', 'coblocks', 'jetpack' ].includes( slug ) ),
] ); |
Oh cool, that's great. Even if we push it down the list, we need to keep CoBlocks clearly marked as so; we're benefitting from community contributions, it's only right to not hide that. |
I get that perspective, but from a users point of view there's no understanding what a "CoBlock" is and we shouldn't be grouping things with branded names. The blocks themselves can/should be branded in someway, but the groupings likely isn't the best solution for customers. |
Unregistering these categories on .com and re-registering something like block collections would be neat: WordPress/gutenberg#16866 I think that way it would be possible to solve some of the branding questions, too. |
I'll close this as outdated. |
Our editor inserter menu group organization on WordPress.com looks like this:
This is a mix of plugin groupings and block type groupings, and is not very user friendly. Our users on WordPress.com simple sites have not installed CoBlocks or Jetpack, so the plugin groupings are confusing. We need to organize groups in a more user intuitive way.
I think the first step here is moving third party plugins from the top of the inserter, and grouping 3rd party blocks lower in the menu. CoBlocks should not be showing above "Common Blocks" for example.
There is some work happening in core Gutenberg to better organize groups: WordPress/gutenberg#11406
Let's contribute to the ideas there, and help inform that work with any usage data we can provide to help core Gutenberg with the most effective ordering.
/cc @kwight @mmtr @shaunandrews @mtias
The text was updated successfully, but these errors were encountered: