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

Move Fonts Library to compat dir for 6.5 #58608

Merged
merged 4 commits into from Feb 2, 2024

Conversation

getdave
Copy link
Contributor

@getdave getdave commented Feb 2, 2024

What?

As the Fonts Library is slated for WP 6.5 this PR moves the files into the compat/wordpress-6.5 dir.

Why?

It's then easier to see which files can be removed once the minimum WP Core version in Gutenberg gets updated.

How?

Moves all files.

Testing Instructions

Testing Instructions for Keyboard

Screenshots or screencast

@getdave
Copy link
Contributor Author

getdave commented Feb 2, 2024

I'm unsure as to what should happen with the "bc" layer code. Can someone validate this please 🙏 ?

Copy link

github-actions bot commented Feb 2, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core SVN

If you're a Core Committer, use this list when committing to wordpress-develop in SVN:

Props: get_dave, youknowriad, antonvlasenko, hellofromtonya.

GitHub Merge commits

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: getdave <get_dave@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
Co-authored-by: anton-vlasenko <antonvlasenko@git.wordpress.org>
Co-authored-by: hellofromtonya <hellofromtonya@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link

github-actions bot commented Feb 2, 2024

This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress.

If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged.

If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack.

Thank you! ❤️

View changed files
❔ lib/load.php
❔ lib/compat/wordpress-6.5/fonts/class-wp-font-collection.php
❔ lib/compat/wordpress-6.5/fonts/class-wp-font-library.php
❔ lib/compat/wordpress-6.5/fonts/class-wp-font-utils.php
❔ lib/compat/wordpress-6.5/fonts/class-wp-rest-font-collections-controller.php
❔ lib/compat/wordpress-6.5/fonts/class-wp-rest-font-faces-controller.php
❔ lib/compat/wordpress-6.5/fonts/class-wp-rest-font-families-controller.php
❔ lib/compat/wordpress-6.5/fonts/fonts.php
❔ lib/experimental/font-face/bc-layer/class-gutenberg-fonts-api-bc-layer.php
❔ lib/experimental/font-face/bc-layer/class-wp-fonts-provider-local.php
❔ lib/experimental/font-face/bc-layer/class-wp-fonts-provider.php
❔ lib/experimental/font-face/bc-layer/class-wp-fonts-resolver.php
❔ lib/experimental/font-face/bc-layer/class-wp-fonts-utils.php
❔ lib/experimental/font-face/bc-layer/class-wp-fonts.php
❔ lib/experimental/font-face/bc-layer/class-wp-web-fonts.php
❔ lib/experimental/font-face/bc-layer/class-wp-webfonts-provider-local.php
❔ lib/experimental/font-face/bc-layer/class-wp-webfonts-provider.php
❔ lib/experimental/font-face/bc-layer/class-wp-webfonts-utils.php
❔ lib/experimental/font-face/bc-layer/class-wp-webfonts.php
❔ lib/experimental/font-face/bc-layer/webfonts-deprecations.php

@hellofromtonya
Copy link
Contributor

hellofromtonya commented Feb 2, 2024

Thanks @getdave for creating this PR. A few change suggestions:

  • Leave the font-face/bc-layer/ in the experimental folder, as it's for the plugin only.
  • Move the font-library.php file to its parent fonts and rename it fonts.php: fonts/font-library/fonts.php. Why? The new global functions in that file will go into Core's wp-includes/fonts.php file.

In the Core PR, the files will go:

  • The new functions -> wp-includes/fonts.php (see here)

  • The class files -> wp-includes/fonts/ without adding a font-library subdirectory (see here)

@youknowriad
Copy link
Contributor

Makes sense @hellofromtonya I applied the feedback and I also removed the useless font-library subfolder.

@youknowriad youknowriad marked this pull request as ready for review February 2, 2024 13:39
Copy link
Contributor

@anton-vlasenko anton-vlasenko left a comment

Choose a reason for hiding this comment

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

The code looks good to me.
I'm fine with getting rid of the lib/experimental/fonts/font-face/bc-layer/ folder and moving it to lib/experimental/font-face/bc-layer/, as long as it doesn't bear any hidden risks—and this change looks safe.

@youknowriad youknowriad enabled auto-merge (squash) February 2, 2024 14:04
@youknowriad youknowriad merged commit e44172e into trunk Feb 2, 2024
60 checks passed
@youknowriad youknowriad deleted the update/move-font-lib-to-compat-dir branch February 2, 2024 14:08
@getdave
Copy link
Contributor Author

getdave commented Feb 2, 2024

💥

@github-actions github-actions bot added this to the Gutenberg 17.7 milestone Feb 2, 2024
@getdave
Copy link
Contributor Author

getdave commented Feb 2, 2024

Let's rebase all the other "nit' PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Font Library [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants