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 classes for custom typography #897

Merged
merged 4 commits into from
Apr 27, 2020
Merged

Conversation

laurelfulford
Copy link
Contributor

@laurelfulford laurelfulford commented Apr 23, 2020

All Submissions:

Changes proposed in this Pull Request:

In Gutenberg 7.9, how some classes were applied in the editor has changed, which has broken some of the custom typography.

This PR fixes that in the parent theme's custom typography code. If there are issues in the child themes, I'll address them in seperate PRs.

This PR also includes a fix for fonts on the front end for the categories, archives and file blocks.

Lastly, there's some pretty gnarly issues with the button block as of 7.9 that I'll be addressing separately; only that block's custom typography in the editor needs to be checked with this PR.

See #893.

How to test the changes in this Pull Request:

  1. Copy-paste the following content into a page: https://cloudup.com/cEUOHTlPNza -- it includes a selection of blocks and settings that have been updated.
  2. For the Homepage Posts block, add a subtitle to at least one of the posts that display there.
  3. Navigate to Customize > Typography, and pick very noticeably different fonts.
  4. View your page in the editor, and the post you added a subtitle to; note a lot of things aren't picking up the custom fonts, or if they are, they're picking up the wrong ones (like the headers inheriting the body font).
  5. Apply the PR.
  6. Confirm that the blocks are using the proper fonts.

In my examples, the titles should be using Impact, and the body should be using Chalkboard -- specific blocks I noticed issues with, include:

Post/Page title:

Before - using the theme default:

image

After:

image

Header Blocks

Before - using the body font:

image

After:

image

Table block:

Before - using theme's default body font:

image

After:

image

Button Block:

Before - using body font:

image

After:

image

Homepage Posts block:

Before - entry meta using theme's default:

image

After:

image

Subtitle (on single post):

Before - using theme's default body font:

image

After:

image

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@laurelfulford laurelfulford added the [Status] Needs Review The issue or pull request needs to be reviewed label Apr 23, 2020
@laurelfulford laurelfulford changed the title Update classes for custom typography for Gutenberg 7.9 Update classes for custom typography Apr 24, 2020
@laurelfulford
Copy link
Contributor Author

It looks like the post title class change was introduced in Gutenberg 7.9.1: WordPress/gutenberg#21099

I'm less sure about the header block, or table.

@jeffersonrabb jeffersonrabb added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels Apr 27, 2020
@laurelfulford
Copy link
Contributor Author

Thanks Jeff!

@laurelfulford laurelfulford merged commit 37e6bb8 into master Apr 27, 2020
@laurelfulford laurelfulford deleted the fixes/editor-typography branch April 27, 2020 21:04
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.6.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gutenberg 7.9 released [Status] Approved The pull request has been reviewed and is ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants