WordPress.org

Make WordPress Core

Opened 5 weeks ago

Closed 9 days ago

#50278 closed enhancement (fixed)

Editor: Update default block categories

Reported by: aduth Owned by: ellatrix
Milestone: 5.5 Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch needs-dev-note commit
Focuses: Cc:

Description

Related: https://github.com/WordPress/gutenberg/pull/19279

Background:

In GB#19279 (issue GB11406), the default set of block categories was updated.

The new set of block categories are:

  • Text
  • Media
  • Design
  • Widgets
  • Embeds
  • Reusable

Of the above, a few have remained unchanged: Widgets, Embeds, Reusable.

Mappings have been added to ensure that existing blocks will be assigned to as close as possible to an equivalent category in the new set:

  • Common → Text
  • Formatting → Text
  • Layout → Design

Task:

The default set of block categories implemented in Core PHP should be updated to correspond to these revisions.

This array:

https://github.com/WordPress/wordpress-develop/blob/5.4.1/src/wp-admin/includes/post.php#L2167-L2196

Attachments (2)

50278.diff (815 bytes) - added by aduth 5 weeks ago.
50278-i18n.diff (1.2 KB) - added by gziolo 13 days ago.
Translation context added

Download all attachments as: .zip

Change History (13)

@aduth
5 weeks ago

#1 @aduth
5 weeks ago

Open question: Should translator context or comment be provided for any of these new strings?

e.g. disambiguate as label of block category? Disambiguate "Text" or "Design" as verb vs. noun.

https://developer.wordpress.org/apis/handbook/internationalization/internationalization-guidelines/#disambiguation-by-context

There was none previously.

#2 @aduth
5 weeks ago

  • Keywords needs-dev-note added

#3 @gziolo
13 days ago

  • Keywords commit added

#4 @ocean90
13 days ago

  • Keywords needs-refresh added; commit removed

Should translator context or comment be provided for any of these new strings?

Yes, block category would be enough.

#5 @gziolo
13 days ago

  • Keywords commit added; needs-refresh removed

This is good to go after i18n part gets updated. We should merge is just before #50420 because otherwise the majority blocks won't be exposed in the inserter. With WordPress 5.5, the category name won't be mandatory anymore.

@gziolo
13 days ago

Translation context added

#6 @gziolo
13 days ago

Thanks @ocean90, I updated the patch to include translation context.

#7 @ellatrix
13 days ago

  • Owner set to ellatrix
  • Resolution set to fixed
  • Status changed from new to closed

In 48119:

Editor: Update default block categories

See https://github.com/WordPress/gutenberg/pull/19279.

Props aduth, gziolo.
Fixes #50278.

#8 @noisysocks
13 days ago

In 48130:

Editor: Revert [48119].

This commit caused the majority of blocks in the block editor to no longer
register as they reference the old category names.

See #50278.

#9 @noisysocks
13 days ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

I reverted 48119 as it caused most blocks to throw an 'Unknown category' error when loading the block editor in trunk without the Gutenberg plugin activated. This made the block editor unusable in trunk and in Make/Core.

We'll need to commit this at the same time that packages are updated so that there aren't calls to registerBlockType() which use the old category.

This ticket was mentioned in Slack in #core by noisysocks. View the logs.


13 days ago

#11 @ellatrix
9 days ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 48177:

Editor: update JavaScript packages

Also update default block categories

Props youknowriad, gziolo, aduth.
Fixes #50420, #50278.

Note: See TracTickets for help on using tickets.