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

Update theme.json schema migrations #36154

Merged
merged 4 commits into from
Nov 3, 2021

Conversation

oandregal
Copy link
Member

@oandregal oandregal commented Nov 2, 2021

Part of #34349

This PR prepares the code that migrates theme.json schemas to add v2 in a subsequent PR, see #36155

It clarifies how migrations are supposed to work and it proposes that each migration only updates from the latest to the new one. Before this, new migrations were supposed to be ported to all versions. See #34485 for an example. As demonstrated by the block deprecations #35663 trying to migrate everything to the latest version is not going to scale well.

How to test

Verify the tests pass. It only refactors code.

@oandregal oandregal self-assigned this Nov 2, 2021
@oandregal oandregal added Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Code Quality Issues or PRs that relate to code quality labels Nov 2, 2021
Copy link
Contributor

@aaronrobertshaw aaronrobertshaw left a comment

Choose a reason for hiding this comment

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

Nice! 👌

I'm really glad to see we are moving in this direction regarding the migration of theme.json schemas.

✅ The code refactoring looks great
✅ Tests are all passing
✅ Manual testing of old theme.json schemas worked

LGTM 👍

@oandregal oandregal merged commit 73afc9a into trunk Nov 3, 2021
@oandregal oandregal deleted the update/theme-json-schema-migrations branch November 3, 2021 07:43
@github-actions github-actions bot added this to the Gutenberg 11.9 milestone Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants