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

CYS: improve font installation with the async job #45411

Merged
merged 4 commits into from
Mar 8, 2024

Conversation

gigitux
Copy link
Contributor

@gigitux gigitux commented Mar 8, 2024

Submission Review Guidelines:

Changes proposed in this Pull Request:

Following the recent discussion on the Font Library and wp_get_font_dir outlined in this post, an observation was made regarding a potential infinite loop in the code responsible for uploading fonts within the Gutenberg editor.

This PR addresses the issue by implementing changes to the font upload code. The adjustments aim to prevent the occurrence of an infinite loop, as detailed in the context of the reported problem. For more details, please refer to the related Gutenberg GitHub repository: WordPress/gutenberg/pull/58839.

This PR applies the patches on our codebase.

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

These testing instructions require a connection with the database

  1. Create a new WooCommerce installation with this version.
  2. Ensure the WooCommerce Beta Tester plugin is installed and activated (available on this monorepo).
  3. Head over to /wp-admin/tools.php?page=woocommerce-admin-test-helper and enable customize-store feature flag.
  4. Install the last version of Gutenberg.
  5. Connect to the database and ensure that doesn't exist any post with these post-type: wp_font_family, wp_font_face and wp_global_styles.
  6. Go on /wp-admin/admin.php?page=wc-settings&tab=advanced&section=woocommerce_com and enable the tracking.
  7. Go on /wp-admin/admin.php?page=wc-status&tab=action-scheduler and ensure that woocommerce_install_assembler_fonts is in pending.
  8. Ensure that the woocommerce_install_assembler_fonts job doesn't fail.
  9. Visit the wp-admin/admin.php?page=wc-admin&path=/customize-store.
  10. Open the network tools.
  11. Follow the process.
  12. Ensure that no POST requests are done on the /font-faces/ endpoint. (it is expected that GET requests are done).
  13. Wait until the Assembler is loaded.
  14. Click on "Change Fonts".
  15. Ensure that the right fonts are applied.

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Comment

CYS: improve font installation with the async job.

@gigitux gigitux added type: refactor The issue/PR is related to refactoring. team: Kirigami & Origami WC Store Editing (FSE) focus: customize-your-store Issues related to the Customize Your Store onboarding flow. labels Mar 8, 2024
@gigitux gigitux self-assigned this Mar 8, 2024
@gigitux gigitux requested review from albarin and nefeline March 8, 2024 09:44
@woocommercebot woocommercebot requested a review from a team March 8, 2024 09:44
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Mar 8, 2024
Copy link
Contributor

github-actions bot commented Mar 8, 2024

Hi @albarin, @nefeline, @woocommerce/woo-fse

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

Copy link
Contributor

github-actions bot commented Mar 8, 2024

Test Results Summary

Commit SHA: 04b1dbd

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 38s
E2E Tests340001103517m 25s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

Copy link
Contributor

@albarin albarin left a comment

Choose a reason for hiding this comment

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

Working great! 🙌

@gigitux gigitux enabled auto-merge (squash) March 8, 2024 10:05
@gigitux gigitux merged commit a57b322 into trunk Mar 8, 2024
32 of 33 checks passed
@gigitux gigitux deleted the improve/font_installation_async branch March 8, 2024 10:26
@github-actions github-actions bot added this to the 8.8.0 milestone Mar 8, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Mar 8, 2024
@Stojdza Stojdza added needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. status: analysis complete Indicates if a PR has been analysed by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Mar 8, 2024
Konamiman pushed a commit that referenced this pull request Mar 13, 2024
* CYS: improve font installation with the async job

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: customize-your-store Issues related to the Customize Your Store onboarding flow. needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris team: Kirigami & Origami WC Store Editing (FSE) type: refactor The issue/PR is related to refactoring.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants