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

Experimental-theme.json: Move pageTemplates to settings #28810

Closed
carolinan opened this issue Feb 7, 2021 · 3 comments
Closed

Experimental-theme.json: Move pageTemplates to settings #28810

carolinan opened this issue Feb 7, 2021 · 3 comments
Labels
[Feature] Themes Questions or issues with incorporating or styling blocks in a theme. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json

Comments

@carolinan
Copy link
Contributor

What problem does this address?

With the update to theme.json, there are two new sections: settings and styles.
But pageTemplates is also on the root level, -not to be confused with the root block selector:

{
	"settings": {
	},
	"styles": {
	},
	"pageTemplates": {
	}
}

What is your proposed solution?

Because the settings section configures the editor,
it would make sense to move pageTemplates to settings.

@carolinan carolinan added [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Feature] Full Site Editing labels Feb 7, 2021
@oandregal
Copy link
Member

👋 The way I see this, settings and styles configure blocks, not the editor ― hence, why they have core/paragraph, core/group, etc as subkeys.

I think it makes sense to me adding the othe theme metadata as top-level keys. Said this, I'm not sure whether pageTemplates should be its own key or bundled together with other data about templates, etc. Haven't looked deeply into it, so I'll leave others to comment.

@carolinan
Copy link
Contributor Author

Got it, it made sense to me to have settings in the same place, because I read the docs as if there were only two main sections.

But I don't feel strongly about it and I see that the docs were updated to indicate this 20 hours ago: https://github.com/WordPress/gutenberg/blob/master/docs/designers-developers/developers/themes/theme-json.md

@lukecarbis
Copy link
Contributor

I like the idea of including a third root key called something like theme or meta which contains pageTemplates as a subkey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Themes Questions or issues with incorporating or styling blocks in a theme. Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json
Projects
None yet
Development

No branches or pull requests

3 participants