Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Should this repository use the same utilities as the community themes? #4

Closed
carolinan opened this issue Jul 3, 2024 · 7 comments · Fixed by #358
Closed

Should this repository use the same utilities as the community themes? #4

carolinan opened this issue Jul 3, 2024 · 7 comments · Fixed by #358
Labels
[Type] Discussion For issues that are high-level and not yet ready to implement. [Type] Question Questions about the design or development of the theme.

Comments

@carolinan
Copy link
Contributor

The community themes repository has some custom tools, including this recent update which adds a command to validate theme.json: WordPress/community-themes#221

Would it be beneficial to use the same tools in this repository?
@ajlende @MaggieCabrera

@carolinan carolinan added [Type] Question Questions about the design or development of the theme. [Type] Discussion For issues that are high-level and not yet ready to implement. labels Jul 3, 2024
@MaggieCabrera
Copy link
Contributor

I think it would be nice to have. The escape pattern script can be very useful if TT5 ends up having as many patterns as TT4 had

@carolinan
Copy link
Contributor Author

Who may be able to help with copying the tools over? :)

@richtabor
Copy link
Member

Curious, what tooling exists in that repo that should be standard for all theme designers?

@karmatosed
Copy link
Member

karmatosed commented Jul 27, 2024

I am also curious what should be standard and if they should be standard how can we make them more accessible to everyone? It's one thing adding them but we also need to document clearly any tools added here that might be unexpected or new. They are going to be amazing once people know about them but confusing until they do.

@ajlende
Copy link
Contributor

ajlende commented Aug 1, 2024

One thing about the validateSchema script in community-themes:

The custom script is required for supporting both Draft 4 & 7 in the same repo. WordPress 6.6 uses Draft 4, but WordPress 6.7 will use Draft 7. And Draft 7 is already being used in Gutenberg trunk (https://schemas.wp.org/trunk/theme.json).

Since TT5 only needs the new script, we could use ajv-cli for validation to keep things simple. Something like this will work once ajv-validator/ajv-cli#242 is merged.

ajv-cli validate \
--allow-matching-properties \
-s <(curl -sSL https://schemas.wp.org/trunk/theme.json) \
-d theme.json

Otherwise, you'll have to download the schema first, but it'll still work.

curl -sSL https://schemas.wp.org/trunk/theme.json -o schema.json &&
ajv-cli validate \
--allow-matching-properties \
-s schema.json \
-d theme.json

@carolinan
Copy link
Contributor Author

Who may be able to help with copying the tools over? :)

@ajlende
Copy link
Contributor

ajlende commented Sep 17, 2024

I'm working on this for contributor day at WCUS

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
[Type] Discussion For issues that are high-level and not yet ready to implement. [Type] Question Questions about the design or development of the theme.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants