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

Pattern Creator: Add theme.json to theme to enable appearance tools. #420

Merged
merged 1 commit into from
Mar 4, 2022

Conversation

ryelle
Copy link
Contributor

@ryelle ryelle commented Mar 2, 2022

This PR adds a theme.json file to enable appearanceTools, which enables all the possible UI controls for typography, colors, spacing, etc. It also enables the custom link color, since add_theme_support( 'experimental-link-color' ); doesn't seem to work.

Just adding a theme.json doesn't trigger wp_is_block_theme, so we don't need to worry about any conflicts or issues with the global header.

⚠️ There's a bug where the theme style overrides the link color when the container has a background, I'm not sure if this is a theme issue or not since I can't customize the link color on TT1 #55028-core.

Screenshots

New settings available in sidebar:

Screen Shot 2022-03-02 at 3 08 13 PM

How to test the changes in this Pull Request:

  1. Create a new pattern
  2. See all the UI options available to you
  3. Use them, they should appear on the frontend correctly

Note that this PR builds on #419 so that the styles are injected as expected.

@ryelle ryelle added the [Component] Pattern Creator Anything related to the pattern front end editor or preview label Mar 2, 2022
@ryelle ryelle added this to the Pattern Creation milestone Mar 2, 2022
@ryelle ryelle requested a review from StevenDufresne March 2, 2022 21:24
@ryelle ryelle self-assigned this Mar 2, 2022
Copy link
Collaborator

@StevenDufresne StevenDufresne left a comment

Choose a reason for hiding this comment

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

Yep, it looks good. The one thing to note is that none of those inputs were showing until I enabled them. I would be surprised if many users are able to find them tucked behind the "..." vertical menu.

@ryelle
Copy link
Contributor Author

ryelle commented Mar 3, 2022

The one thing to note is that none of those inputs were showing until I enabled them. I would be surprised if many users are able to find them tucked behind the "..." vertical menu.

Good point - that is how it works in gutenberg, so anyone used to working in GB should know to check the dots, but I'll see if I can get them to default on in the pattern creator (in another PR)

Base automatically changed from fix/inline-and-global-styles to trunk March 4, 2022 22:19
@ryelle ryelle merged commit 6989f87 into trunk Mar 4, 2022
@ryelle ryelle deleted the add/theme.json branch March 4, 2022 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Pattern Creator Anything related to the pattern front end editor or preview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants