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

fix: Add crossorigin to font preloads #967

Merged
merged 2 commits into from
Feb 11, 2021

Conversation

NicholasBoll
Copy link
Member

Fonts aren't preloading with the following warnings:

A preload for 'https://design.workdaycdn.com/beta/assets/fonts@1.0.0/roboto/ttf/Roboto-Regular.ttf' is found, but is not used because the request credentials mode does not match. Consider taking a look at crossorigin attribute.

Since preloads are failing, we're also getting the following warnings:

The resource https://design.workdaycdn.com/beta/assets/fonts@1.0.0/roboto/ttf/RobotoMono-Regular.ttf was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally.

This fixes both warnings and makes sure Chromatic is correctly preloading fonts.

Fonts aren't preloading with the following warnings:
> A preload for 'https://design.workdaycdn.com/beta/assets/fonts@1.0.0/roboto/ttf/Roboto-Regular.ttf' is found, but is not used because the request credentials mode does not match. Consider taking a look at crossorigin attribute.

Since preloads are failing, we're also getting the following warnings:
> The resource https://design.workdaycdn.com/beta/assets/fonts@1.0.0/roboto/ttf/RobotoMono-Regular.ttf was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.

This fixes both warnings and makes sure Chromatic is correctly preloading fonts.
@NicholasBoll
Copy link
Member Author

I've verified the latest Chromatic build does not show these warnings anymore: https://5d854c26ba934e0020f5e98a-qkqvhxxxet.chromatic.com/

@NicholasBoll NicholasBoll moved this from In Progress to Needs Review in Current Sprint (7/20 - 8/9) Feb 11, 2021
@NicholasBoll NicholasBoll merged commit 69cc4b4 into master Feb 11, 2021
Current Sprint (7/20 - 8/9) automation moved this from Needs Review to Done Feb 11, 2021
@NicholasBoll NicholasBoll deleted the fix/cross-origin-font-issue branch February 11, 2021 21:49
alanbsmith added a commit to alanbsmith/canvas-kit that referenced this pull request Feb 16, 2021
75e909f (upstream/master, master) feat(common): Add useIsRTL hook to common module (Workday#971)
771a215 fix(tabs): Remove event.preventDefault from TabList (Workday#969)
b7f87a1 Update Pagination component (Workday#954)
91acada Roll back to `pull_request`
69cc4b4 fix: Add crossorigin to font preloads (Workday#967)
ea5dbd8 ci: Use pull_request_target in GH Actions
159da10 docs: Fix Story names and extra imports (Workday#966)
8dcc951 docs: Improve documentation (Workday#964)
221fa1c feat: Add closeButtonAriaLabel to Modal Component (Workday#959)
339be74 ci: Remove jest code-coverage threshold (Workday#957)
6491da3 docs: Add compound component doc (Workday#937)
d7ec090 feat: Add window config option to inherit or override mono font family (Workday#916)
968130a chore: Bump ini from 1.3.5 to 1.3.7 (Workday#931)
27504a1 feat(skeleton): Add option for different skeleton colors (Workday#939)
3ba2da8 chore: Update @workday/canvas-system-icons-web dependency (Workday#940)
37cfd15 Add custom limit to CountBadge (Workday#935)
3634149 chore(form-field): Update FormField Readme (Workday#930)
42b9235 fix: Fix create component scripts (Workday#929)
b3ee342 docs: Standardize README badges for Labs components (Workday#928)
@alanbsmith alanbsmith mentioned this pull request Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants