Skip to content

Global Styles in WordPress 5.7 #27506

Closed
Closed

Description

@oandregal

This issue describes what it entails to land the "Global Styles" project in WordPress core. The project has two main functions: 1) allows themes to control the editor settings via theme.json, and 2) creates a mechanism that coordinates core, theme, and user styles.

  • Control editor settings: to land as part of 5.7.
  • Style mechanism: while it works without a UI (this is, without user styles), the plan is to land this part paired with the UI (sidebar at edit-site) to make sure the underlying APIs match the UI needs.

Tasks

Affected files

  • lib/editor-settings.php => land gutenberg_get_common_block_editor_settings so other editors don't need to repeat the same logic.
  • lib/experimental-theme.json => land the parts of it that affect settings.
  • lib/class-wp-theme-json.php => land the parts of it that affect settings.
  • lib/class-wp-theme-json-resolver.php => land the parts of it that affect settings. e.g.: do not expose user-origin methods as that something that only makes sense for styles at the moment.
  • lib/global-styles.php => land gutenberg_experimental_global_styles_settings (but only the settings logic, not the styles)
  • phpunit/class-wp-theme-json-test.php => land the tests related to settings and schema validation.
  • phpunit/class-wp-theme-json-legacy-settings-test.php => to be paired with lib/global-styles.php

Activity

  1. self-assigned this
    on Dec 4, 2020
  2. added
    Global Styles
    on Dec 4, 2020
  3. oandregal commented on Dec 14, 2020

    @oandregal
    MemberAuthor

    I've removed the following two tasks from being blockers as they seem to be addressable after landing (if/when need it):

  4. changed the title [-]Land Global Styles in WordPress core[/-] [+]Global Styles in WordPress 5.7[/+] on Jan 18, 2021
  5. oandregal commented on Jan 27, 2021

    @oandregal
    MemberAuthor

    Removed #25612 from being a blocker. Can be added later.

  6. oandregal commented on Jan 27, 2021

    @oandregal
    MemberAuthor

    I've confirmed with @swissspidy that the structure for i18n-theme.json to be updated in #28110 together with #28246 is fine from a wp-cli perspective.

  7. oandregal commented on Jan 27, 2021

    @oandregal
    MemberAuthor

    #28533 is ready for review.

  8. swissspidy commented on Jan 27, 2021

    @swissspidy
    Member

    I've confirmed with @swissspidy that the structure for i18n-theme.json to be updated in #28110 together with #28246 is fine from a wp-cli perspective.

    pinging @schlessera and @ocean90 for review just in case

  9. oandregal commented on Jan 27, 2021

    @oandregal
    MemberAuthor

    The latest can be reviewed on master: https://github.com/WordPress/gutenberg/blob/master/lib/experimental-i18n-theme.json I don't think I have to do any other modifications for the work in this issue, but happy to iterate and accomodate any other needs.

  10. oandregal commented on Feb 10, 2021

    @oandregal
    MemberAuthor

    The main PRs this issue tracked are now shipped. While the plan was to port settings management to 5.7, we realized it was too soon to freeze theme.json format, see more details.

    Going to close this one. Follow up #20331 for updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Global Styles

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions