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

theme.json schema: Add settings.color.caption definition #60017

Merged
merged 2 commits into from Mar 20, 2024

Conversation

t-hamano
Copy link
Contributor

@t-hamano t-hamano commented Mar 20, 2024

What?

This PR adds the missing settings.color.caption definition in the theme.json schema. This should also eliminate the warning that is occurring in TT4's the default theme.json.

tt4_theme_json

Testing Instructions

Create a JSON file like the one below locally and make sure the settings.color.caption property is allowed.

{
	"$schema": "https://raw.githubusercontent.com/WordPress/gutenberg/fix/theme-json-schema-caption/schemas/json/theme.json",
	"version": 2,
	"settings": {
		"color": {
		}
	}
}

Testing Instructions for Keyboard

Screenshots or screencast

Before

image

After

image

@t-hamano t-hamano added the [Type] Developer Documentation Documentation for developers label Mar 20, 2024
@t-hamano t-hamano self-assigned this Mar 20, 2024
@t-hamano t-hamano marked this pull request as ready for review March 20, 2024 04:56
Copy link

github-actions bot commented Mar 20, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: ajitbohra <ajitbohra@git.wordpress.org>
Co-authored-by: carolinan <poena@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Member

@ajitbohra ajitbohra left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@carolinan
Copy link
Contributor

carolinan commented Mar 20, 2024

I believe this is correct and that this PR should be merged, but I got confused for a moment because I do not see a warning in Twenty Twenty-Four,
Twenty Twenty-Four only sets a default text color on the captions under theme.json.styles.elements.caption, not settings.

@t-hamano
Copy link
Contributor Author

@carolinan Sorry, there was a mistake in my explanation 😅 What I wanted to mention is the core (default) thme.json, not the TT4 theme.json. I mean, this file.

https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/theme.json

@t-hamano t-hamano merged commit 5fe11bf into trunk Mar 20, 2024
64 checks passed
@t-hamano t-hamano deleted the fix/theme-json-schema-caption branch March 20, 2024 09:38
@github-actions github-actions bot added this to the Gutenberg 18.0 milestone Mar 20, 2024
carstingaxion pushed a commit to carstingaxion/gutenberg that referenced this pull request Mar 27, 2024
…0017)

* theme.json schema: Add settings.color.caption definition

* Rebuild docs

Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: ajitbohra <ajitbohra@git.wordpress.org>
Co-authored-by: carolinan <poena@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants