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

The "Default" style is gone from WordPress 5.5. #24147

Closed
ddryo opened this issue Jul 23, 2020 · 3 comments · Fixed by #24217
Closed

The "Default" style is gone from WordPress 5.5. #24147

ddryo opened this issue Jul 23, 2020 · 3 comments · Fixed by #24217
Labels
[Feature] Theme Style Variations Related to style variations provided by block themes [Type] Regression Related to a regression in the latest release

Comments

@ddryo
Copy link
Contributor

ddryo commented Jul 23, 2020

Thank you for always improving Gutenberg.

The "Default" style is gone from WordPress 5.5.

If you added your own block style from the theme or plugin side, the "default" style was displayed automatically until now.

Since this is gone, the block style cannot be undone.

Is this a specification?

If you add the "default" style for 5.5 or later, you will see two "default" styles before 5.4, which is a little troublesome.

I want to know why it was changed like this.

Screenshots

WordPress 5.4
スクリーンショット 2020-07-23 13 03 47

WordPress 5.5
スクリーンショット 2020-07-23 13 05 23

@ddryo ddryo changed the title The "default" style is gone from WordPress 5.5. The "Default" style is gone from WordPress 5.5. Jul 23, 2020
@augustuswm
Copy link

Our organization ran in to the same issue. Mainly need to know if this is an intended change so we can take it into account.

@ocean90 ocean90 added Needs Technical Feedback Needs testing from a developer perspective. [Type] Regression Related to a regression in the latest release [Feature] Theme Style Variations Related to style variations provided by block themes labels Jul 26, 2020
@ocean90
Copy link
Member

ocean90 commented Jul 26, 2020

Confirmed the issue. You can reproduce it by simply running the following in the browser console:

wp.blocks.registerBlockStyle( 'core/list', {
	name: 'test',
	label: 'Test',
} );

In 5.4 you automatically get the "Default" and "Test" style, in 5.5 only "Test.

The code for this is still seems to be there:

if ( ! type.styles && ! find( styles, 'isDefault' ) ) {
styles.unshift( {
name: 'default',
label: _x( 'Default', 'block style' ),
isDefault: true,
} );
}

#21973 might be related. cc @adamziel

@oandregal oandregal self-assigned this Jul 27, 2020
@oandregal
Copy link
Member

According to git bisect #22849 is the PR that introduced the regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Theme Style Variations Related to style variations provided by block themes [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants