Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#50278 closed enhancement (fixed)

Editor: Update default block categories

Reported by: aduth's profile aduth Owned by: ellatrix's profile ellatrix
Milestone: 5.5 Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch commit has-dev-note
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 4 years ago.
50278-i18n.diff (1.2 KB) - added by gziolo 4 years ago.
Translation context added

Download all attachments as: .zip

Change History (16)

@aduth
4 years ago

#1 @aduth
4 years 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
4 years ago

  • Keywords needs-dev-note added

#3 @gziolo
4 years ago

  • Keywords commit added

#4 @ocean90
4 years 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
4 years 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
4 years ago

Translation context added

#6 @gziolo
4 years ago

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

#7 @ellatrix
4 years 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
4 years 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
4 years 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.


4 years ago

#11 @ellatrix
4 years 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.

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


4 years ago

This ticket was mentioned in Slack in #core-editor by justinahinon. View the logs.


4 years ago

#14 @justinahinon
4 years ago

  • Keywords has-dev-note added; needs-dev-note removed
Note: See TracTickets for help on using tickets.