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

Restore The wp-blocks stylesheet for backwards compatibility concerns #6778

Merged
merged 1 commit into from
May 17, 2018

Conversation

youknowriad
Copy link
Contributor

This PR restores an empty wp-blocks stylesheet for backwards compatibility. Several docs were suggesting adding this stylesheet as a dependency. create-guten-blocks also does so for each generated block.

Question

  • How to communicate that this is deprecated and shouldn't be depended upon?

@youknowriad youknowriad added the Backwards Compatibility Issues or PRs that impact backwards compatability label May 16, 2018
@youknowriad youknowriad added this to the 2.9 milestone May 16, 2018
@youknowriad youknowriad self-assigned this May 16, 2018
@youknowriad youknowriad requested review from gziolo and a team May 16, 2018 11:22
@ZebulanStanphill
Copy link
Member

Hey, this explains why the blocks in a plugin I was working on were missing their shared-by-editor-and-front-end styles... the stylesheet was not loading because wp-blocks no longer existed.

Is there a replacement for this stylesheet? Actually, what did it do in the first place?

@youknowriad
Copy link
Contributor Author

@SuperGeniusZeb I don't know why we had docs requiring this as a dependency, it's useless, just remove it. These were moved to wp-core-blocks but third party blocks don't need to depend on it.

array(
'wp-blocks',
),
array(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we need to submit a patch to WP-CLI to avoid confusion ...

@@ -360,6 +360,13 @@ function gutenberg_register_scripts_and_styles() {
);

// Editor Styles.
wp_register_style(
'wp-blocks',
gutenberg_url( 'build/blocks/style.css' ),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wp_register_style( 'wp-blocks', false ); should be enough for back-compat.

@youknowriad youknowriad force-pushed the update/restore-wp-blocks-style-for-bc branch from a88b2b6 to 7a873d8 Compare May 17, 2018 07:48
Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐑

@youknowriad youknowriad merged commit e24d886 into master May 17, 2018
@youknowriad youknowriad deleted the update/restore-wp-blocks-style-for-bc branch May 17, 2018 08:03
@ajitbohra
Copy link
Member

@youknowriad wild guess it was probably added for demonstration purpose

@gziolo WP-CLI Patch submitted wp-cli/scaffold-command#151

@ajitbohra
Copy link
Member

ajitbohra commented May 19, 2018

@youknowriad @gziolo

For create-guten-block there is already PR ahmadawais/create-guten-block#56 and issue for the same ahmadawais/create-guten-block#55

@gziolo
Copy link
Member

gziolo commented May 21, 2018

Awesome work @ajitbohra 💯 WP-CLI patch has already landed 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants