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 getAllowedMimeTypes to FontUtils #58667

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

youknowriad
Copy link
Contributor

What?

This moves this utility function to a font utils class per feedback on the Core backport PR as it's not something specific to a collection or the font library.

No functional change here.

@youknowriad youknowriad added [Type] Code Quality Issues or PRs that relate to code quality Backport from WordPress Core Pull request that needs to be backported to a Gutenberg release from WordPress Core [Feature] Font Library labels Feb 5, 2024
@youknowriad youknowriad self-assigned this Feb 5, 2024
Copy link

github-actions bot commented Feb 5, 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: youknowriad, get_dave.

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: youknowriad <youknowriad@git.wordpress.org>
Co-authored-by: getdave <get_dave@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 5, 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/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-faces-controller.php
❔ phpunit/tests/fonts/font-library/fontLibraryHooks.php

@youknowriad youknowriad removed the [Type] Code Quality Issues or PRs that relate to code quality label Feb 5, 2024
Copy link
Contributor

@getdave getdave left a comment

Choose a reason for hiding this comment

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

This change feels entirely logical. These are util type functions as indicated by their static keyword in the original class.

The utils class is a more natural fit.

@youknowriad youknowriad force-pushed the update/move-set-allowed-mime-types branch from 8a99e38 to 584a4e8 Compare February 5, 2024 11:39
@@ -1,89 +0,0 @@
<?php
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test is useless to me, it just repeats the same logic of the function IMO

@youknowriad youknowriad enabled auto-merge (squash) February 5, 2024 11:40
@youknowriad youknowriad disabled auto-merge February 5, 2024 11:40
@youknowriad youknowriad enabled auto-merge (squash) February 5, 2024 11:40
Copy link

github-actions bot commented Feb 5, 2024

Flaky tests detected in 584a4e8.
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/7783860054
📝 Reported issues:

@youknowriad youknowriad merged commit 528d2b7 into trunk Feb 5, 2024
57 checks passed
@youknowriad youknowriad deleted the update/move-set-allowed-mime-types branch February 5, 2024 12:11
@github-actions github-actions bot added this to the Gutenberg 17.7 milestone Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport from WordPress Core Pull request that needs to be backported to a Gutenberg release from WordPress Core [Feature] Font Library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants