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

Design Tools: Add block instance elements color support for buttons and headings #5164

Conversation

aaronrobertshaw
Copy link

This is a backport PR for WordPress 6.4 that includes the following PHP Gutenberg changes:

It also adds a couple of unit tests to cover the application of the wp-elements-* classname for buttons and headings.

Trac ticket: https://core.trac.wordpress.org/ticket/59309


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Copy link
Contributor

@tellthemachines tellthemachines left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Left a couple comments below.

I suppose it's not worth adding a test for wp_render_elements_support_styles given that it doesn't return anything significant.

src/wp-includes/block-supports/elements.php Outdated Show resolved Hide resolved
src/wp-includes/block-supports/elements.php Show resolved Hide resolved
@aaronrobertshaw
Copy link
Author

Thanks for the review @tellthemachines 👍

I suppose it's not worth adding a test for wp_render_elements_support_styles given that it doesn't return anything significant.

I was in two minds about this, on one hand it would be good to confirm that elements styles are generated appropriately, on the other hand it's really just testing the style engine. Ultimately, my reasoning in omitting it was as you suggested, it doesn't really return anything of note.

Copy link
Contributor

@tellthemachines tellthemachines left a comment

Choose a reason for hiding this comment

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

LGTM!

@tellthemachines
Copy link
Contributor

Committed in r56604.

@aaronrobertshaw aaronrobertshaw changed the title Design Tools: Add block instance elements support for buttons and headings Design Tools: Add block instance elements color support for buttons and headings Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants