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

Relocates Font Face and Fonts Library PHP files into Core's fonts directory #53747

Merged
merged 2 commits into from
Aug 16, 2023

Conversation

hellofromtonya
Copy link
Contributor

@hellofromtonya hellofromtonya commented Aug 16, 2023

What?

Relocates the PHP files for Font Face and Fonts Library into lib/experimental/fonts/.

Why?

To align the directory structure with Core.

Font Face and Fonts Library are both part of fonts management. WordPress Core has an existing wp-includes/fonts/ directory. The lib/experimental/fonts/ directory was intended to align to Core's fonts directory.

How?

  • Font Face: moves its files into fonts/font-face/.
  • Fonts Library: moves its directory into fonts.

Testing Instructions

All CI jobs should pass ✅

Locally running the following command should run all Font Face and Fonts Library tests:

npm run test:unit:php:base -- --group fonts

@hellofromtonya hellofromtonya requested review from matiasbenedetto and removed request for spacedmonkey August 16, 2023 19:27
@hellofromtonya hellofromtonya added [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta [Feature] Typography Font and typography-related issues and PRs labels Aug 16, 2023
@hellofromtonya hellofromtonya self-assigned this Aug 16, 2023
@github-actions
Copy link

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/experimental/fonts/font-face/bc-layer/class-gutenberg-fonts-api-bc-layer.php
❔ lib/experimental/fonts/font-face/bc-layer/class-wp-fonts-provider-local.php
❔ lib/experimental/fonts/font-face/bc-layer/class-wp-fonts-provider.php
❔ lib/experimental/fonts/font-face/bc-layer/class-wp-fonts-resolver.php
❔ lib/experimental/fonts/font-face/bc-layer/class-wp-fonts-utils.php
❔ lib/experimental/fonts/font-face/bc-layer/class-wp-fonts.php
❔ lib/experimental/fonts/font-face/bc-layer/class-wp-web-fonts.php
❔ lib/experimental/fonts/font-face/bc-layer/class-wp-webfonts-provider-local.php
❔ lib/experimental/fonts/font-face/bc-layer/class-wp-webfonts-provider.php
❔ lib/experimental/fonts/font-face/bc-layer/class-wp-webfonts-utils.php
❔ lib/experimental/fonts/font-face/bc-layer/class-wp-webfonts.php
❔ lib/experimental/fonts/font-face/bc-layer/webfonts-deprecations.php
❔ lib/experimental/fonts/font-face/class-wp-font-face-resolver.php
❔ lib/experimental/fonts/font-face/class-wp-font-face.php
❔ lib/experimental/fonts/font-face/fonts.php
❔ lib/experimental/fonts/fonts-library/class-wp-font-family-utils.php
❔ lib/experimental/fonts/fonts-library/class-wp-font-family.php
❔ lib/experimental/fonts/fonts-library/class-wp-fonts-library.php
❔ lib/experimental/fonts/fonts-library/class-wp-rest-fonts-library-controller.php
❔ lib/experimental/fonts/fonts-library/fonts-library.php
❔ phpunit/fonts/font-face/wp-font-face-testcase.php
❔ phpunit/fonts/font-face/wp-font-face-tests-dataset.php
❔ phpunit/fonts/font-face/wpFontFace/generateAndPrint-test.php
❔ phpunit/fonts/font-face/wpFontFaceResolver/getFontsFromThemeJson-test.php
❔ phpunit/fonts/font-face/wpPrintFontFaces-test.php
❔ phpunit/fonts/fonts-library/class-wp-rest-fonts-library-controller-test.php
❔ phpunit/fonts/fonts-library/wpFontFamily/__construct-test.php
❔ phpunit/fonts/fonts-library/wpFontFamily/base.php
❔ phpunit/fonts/fonts-library/wpFontFamily/getData-test.php
❔ phpunit/fonts/fonts-library/wpFontFamily/getDataAsJson-test.php
❔ phpunit/fonts/fonts-library/wpFontFamily/getFontPost-test.php
❔ phpunit/fonts/fonts-library/wpFontFamily/hasFontFaces-test.php
❔ phpunit/fonts/fonts-library/wpFontFamily/install-test.php
❔ phpunit/fonts/fonts-library/wpFontFamily/uninstall-test.php
❔ phpunit/fonts/fonts-library/wpFontFamilyUtils/getFilenameFromFontFace-test.php
❔ phpunit/fonts/fonts-library/wpFontFamilyUtils/hasFontMimeType-test.php
❔ phpunit/fonts/fonts-library/wpFontFamilyUtils/mergeFontsData-test.php
❔ phpunit/fonts/fonts-library/wpFontsLibrary/getFontsDir-test.php
❔ phpunit/fonts/fonts-library/wpFontsLibrary/setUploadDir-test.php

@hellofromtonya
Copy link
Contributor Author

Also marking this PR as part of the fonts management work that will be backported (merged into) Core for 6.4.

Copy link
Contributor

@matiasbenedetto matiasbenedetto left a comment

Choose a reason for hiding this comment

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

I tested this following the testing instructions. It runs as expected.
LGTM

@github-actions
Copy link

Flaky tests detected in c89b07c.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5883012516
📝 Reported issues:

@hellofromtonya hellofromtonya merged commit c14792d into trunk Aug 16, 2023
53 of 54 checks passed
@hellofromtonya hellofromtonya deleted the try/move-font-face-font-library-into-fonts-dir branch August 16, 2023 20:03
@github-actions github-actions bot added this to the Gutenberg 16.6 milestone Aug 16, 2023
@mikachan mikachan added the Needs PHP backport Needs PHP backport to Core label Sep 5, 2023
@hellofromtonya hellofromtonya removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Sep 6, 2023
@hellofromtonya
Copy link
Contributor Author

Font Face was merged into Core via changeset https://core.trac.wordpress.org/changeset/56500

Leaving the Needs PHP backport label to cover Font Library.

@youknowriad youknowriad added Backported to WP Core Pull request that has been successfully merged into WP Core and removed Needs PHP backport Needs PHP backport to Core labels Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported to WP Core Pull request that has been successfully merged into WP Core [Feature] Typography Font and typography-related issues and PRs [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants