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 - Core: fix font load when user opts out of tracking #45185

Conversation

gigitux
Copy link
Contributor

@gigitux gigitux commented Feb 28, 2024

Submission Review Guidelines:

As a spec, we had to add the "Instrument Sans + Jost" font pair. The issue is that these fonts are loaded in a different variation of the TT4. Currently, we are using the default one. With the default variation, only Inter and Cargo fonts are loaded..

Adding the "Instrument Sans + Jost" font pair could be complex. Should we work on it?

cc @verofasulo @nefeline @albarin

EDIT: @verofasulo confirmed that we can avoid to work to implement the "Instrument Sans + Jost" font pair. p1709138640335519/1709039848.913899-slack-C053716F2H2

Changes proposed in this Pull Request:

Closes #45138.

How to test the changes in this Pull Request:

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

  1. Enable the WooCommerce Beta Tester plugin if you don't have it enabled yet
  2. On your Dashboard, head over to Tools > WCA Test Helper > Features and enable the customize-store
  3. Ensure you have the Gutenberg plugin installed from the latest trunk (or install it from this zip file: gutenberg.zip
  4. Visit /wp-admin/admin.php?page=wc-settings&tab=advanced&section=woocommerce_com and ensure that the Allow usage of WooCommerce to be tracked isn't enabled.
  5. Visit the /wp-admin/admin.php?page=wc-admin&path=/customize-store.
  6. Follow the process.
  7. On the sidebar, click on Choose your Fonts.
  8. Ensure that only Cardo/System sans-serif and Inter/Cardo are visible.
  9. For each preview, ensure that the right fonts are rendered:
Header Header
image oBWTjB.png
  1. Visit /wp-admin/admin.php?page=wc-settings&tab=advanced&section=woocommerce_com and enable the tracking.
  2. Visit the /wp-admin/admin.php?page=wc-admin&path=/customize-store.
  3. Follow the process.
  4. On the sidebar, click on Choose your Fonts.
  5. Ensure that more than two font pairs are visible.
  6. For each preview, ensure that the right fonts are rendered.

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

CYS - Core: fix font load when user opts out of tracking.

Comment

@gigitux gigitux added type: bug The issue is a confirmed bug. team: Kirigami & Origami focus: customize-your-store Issues related to the Customize Your Store onboarding flow. labels Feb 28, 2024
@gigitux gigitux requested review from albarin, nefeline and a team February 28, 2024 13:24
@gigitux gigitux self-assigned this Feb 28, 2024
Copy link
Contributor

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

github-actions and others added 3 commits February 28, 2024 13:26
…ad-fonts-when-user-opts-out-of-tracking' of github.com:woocommerce/woocommerce into 45138-cys-core-font-preview-and-site-preview-fail-to-load-fonts-when-user-opts-out-of-tracking
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Feb 28, 2024
@@ -558,14 +523,14 @@ export const FONT_PAIRINGS_WHEN_USER_DID_NOT_ALLOW_TRACKING = [
elements: {
heading: {
typography: {
fontFamily: 'var(--wp--preset--font-family--inter)',
fontFamily: 'var(--wp--preset--font-family--body)',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have to use the variable defined by the theme: https://github.com/WordPress/twentytwentyfour/blob/trunk/theme.json#L215

fontStyle: 'normal',
fontWeight: '300',
},
},
},
typography: {
fontFamily: 'var(--wp--preset--font-family--cardo)',
fontFamily: 'var(--wp--preset--font-family--heading)',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

github-actions bot commented Feb 28, 2024

Test Results Summary

Commit SHA: 8b21b9f

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 37s
E2E Tests328001903477m 32s

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.

👌

@gigitux gigitux enabled auto-merge (squash) February 28, 2024 14:38
@gigitux gigitux merged commit e4574e2 into trunk Feb 28, 2024
28 checks passed
@gigitux gigitux deleted the 45138-cys-core-font-preview-and-site-preview-fail-to-load-fonts-when-user-opts-out-of-tracking branch February 28, 2024 14:47
@github-actions github-actions bot added this to the 8.8.0 milestone Feb 28, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Feb 28, 2024
@alopezari alopezari 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 Feb 29, 2024
Konamiman pushed a commit that referenced this pull request Mar 13, 2024
* CYS - Core: fix font load when user opts out of tracking

* remove comment

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

* fix array to pass to FontFamiliesLoader

* fix crash

* fix font pair selected after the setup

---------

Co-authored-by: github-actions <github-actions@github.com>
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 type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CYS - Core] Font Preview and Site Preview Fail to load fonts when user opts out of tracking
3 participants