-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
What problem does this address?
Following on from a couple of comments on #38883 and related PRs.
One of the things that we've bumped into while making overrides to theme.json
support in the lib/compat
directory, is the potential confusion between which changes belong in the wordpress-5.9
and wordpress-6.0
directories (for backwards and forwards compatibility), and which overrides we'll need to maintain in perpetuity due to Gutenberg being the main place for development of global styles related features.
One way of looking at it is that the files in the lib/compat
directory serve the following purposes:
- Maintain backwards compatibility with the current + previous WordPress versions
- Maintain compatibility with the current trunk of
wordpress-develop
- Maintain evergreen overrides for core WordPress, that should always point to Gutenberg functions / implementations, to preserve the development environment (and experimentation of features that might not make it to core) in Gutenberg
What is your proposed solution?
- Can we split out those evergreen overrides that we need to have to a separate directory, and add more documentation at the top of each file instructing how to use it?
- If there are any files that we should not modify when making changes, is it worth adding additional linting to prevent accidental changes?
- If we settle on a consistent layout that we'd like to go with (or if we have one already), is it worth us updating the backward-compatibility.md documentation to provide guidance on how we use this area?
The overall goal for this issue is to see what changes we can make to improve the developer experience on making updates to theme.json
/ global settings and styles, to hopefully make it easier for new contributors to contribute to or slot into development work in these areas.