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
Merged
gigitux
merged 8 commits into
trunk
from
45138-cys-core-font-preview-and-site-preview-fail-to-load-fonts-when-user-opts-out-of-tracking
Feb 28, 2024
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5551ae3
CYS - Core: fix font load when user opts out of tracking
gigitux 977344c
Merge branch 'trunk' of github.com:woocommerce/woocommerce into 45138…
gigitux d609b1d
remove comment
gigitux 69d435a
Add changefile(s) from automation for the following project(s): wooco…
invalid-email-address 0b20208
fix array to pass to FontFamiliesLoader
gigitux b2a3091
Merge branch '45138-cys-core-font-preview-and-site-preview-fail-to-lo…
gigitux 32818e3
fix crash
gigitux 8b21b9f
fix font pair selected after the setup
gigitux File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -474,7 +474,8 @@ export const FONT_PAIRINGS_WHEN_USER_DID_NOT_ALLOW_TRACKING = [ | |
theme: [ | ||
{ | ||
fontFamily: 'Cardo', | ||
slug: 'cardo', | ||
// Use the theme-defined variable: https://github.com/WordPress/twentytwentyfour/blob/trunk/theme.json#L240 | ||
slug: 'heading', | ||
}, | ||
{ | ||
fontFamily: 'System Sans-serif', | ||
|
@@ -488,7 +489,7 @@ export const FONT_PAIRINGS_WHEN_USER_DID_NOT_ALLOW_TRACKING = [ | |
elements: { | ||
heading: { | ||
typography: { | ||
fontFamily: 'var(--wp--preset--font-family--cardo)', | ||
fontFamily: 'var(--wp--preset--font-family--heading)', | ||
fontStyle: 'normal', | ||
fontWeight: '300', | ||
}, | ||
|
@@ -499,41 +500,6 @@ export const FONT_PAIRINGS_WHEN_USER_DID_NOT_ALLOW_TRACKING = [ | |
}, | ||
}, | ||
}, | ||
{ | ||
title: 'Jost + Instrument Sans', | ||
version: 2, | ||
lookAndFeel: [] as Look[], | ||
settings: { | ||
typography: { | ||
fontFamilies: { | ||
theme: [ | ||
{ | ||
fontFamily: 'Jost', | ||
slug: 'jost', | ||
}, | ||
{ | ||
fontFamily: 'Instrument Sans', | ||
slug: 'instrument-sans', | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
styles: { | ||
elements: { | ||
heading: { | ||
typography: { | ||
fontFamily: 'var(--wp--preset--font-family--jost)', | ||
fontStyle: 'normal', | ||
fontWeight: '100 900', | ||
}, | ||
}, | ||
}, | ||
typography: { | ||
fontFamily: 'var(--wp--preset--font-family--instrument-sans)', | ||
}, | ||
}, | ||
}, | ||
{ | ||
title: 'Inter + Cardo Font', | ||
version: 2, | ||
|
@@ -544,11 +510,13 @@ export const FONT_PAIRINGS_WHEN_USER_DID_NOT_ALLOW_TRACKING = [ | |
theme: [ | ||
{ | ||
fontFamily: 'Inter', | ||
slug: 'inter', | ||
// Use the theme-defined variable: https://github.com/WordPress/twentytwentyfour/blob/trunk/theme.json#L215 | ||
slug: 'body', | ||
}, | ||
{ | ||
fontFamily: 'Cardo', | ||
slug: 'cardo', | ||
// Use the theme-defined variable: https://github.com/WordPress/twentytwentyfour/blob/trunk/theme.json#L240 | ||
slug: 'heading', | ||
}, | ||
], | ||
}, | ||
|
@@ -558,14 +526,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)', | ||
fontStyle: 'normal', | ||
fontWeight: '300', | ||
}, | ||
}, | ||
}, | ||
typography: { | ||
fontFamily: 'var(--wp--preset--font-family--cardo)', | ||
fontFamily: 'var(--wp--preset--font-family--heading)', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
}, | ||
}, | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...-cys-core-font-preview-and-site-preview-fail-to-load-fonts-when-user-opts-out-of-tracking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: fix | ||
|
||
CYS - Core: fix font load when user opts out of tracking. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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