-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
NextJS: Fix fonts not loading with 3+ words in name #23121
Merged
valentinpalkovic
merged 1 commit into
storybookjs:next
from
ygkn:next-font-fix-not-loading-fonts-has-3-words-name
Jun 19, 2023
Merged
NextJS: Fix fonts not loading with 3+ words in name #23121
valentinpalkovic
merged 1 commit into
storybookjs:next
from
ygkn:next-font-fix-not-loading-fonts-has-3-words-name
Jun 19, 2023
Conversation
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
@ygkn Thank you so much for your code contribution! The change looks reasonable to me. Let's merge it as soon as the CI turns green :) |
valentinpalkovic
approved these changes
Jun 19, 2023
JReinhold
pushed a commit
that referenced
this pull request
Jun 19, 2023
…as-3-words-name NextJS: fix not loading fonts has 3 (or more) words name (cherry picked from commit 0d7c3a8)
This was referenced Jun 19, 2023
Merged
JReinhold
pushed a commit
that referenced
this pull request
Jun 19, 2023
…as-3-words-name NextJS: fix not loading fonts has 3 (or more) words name (cherry picked from commit 0d7c3a8)
JReinhold
pushed a commit
that referenced
this pull request
Jun 19, 2023
…as-3-words-name NextJS: fix not loading fonts has 3 (or more) words name (cherry picked from commit 0d7c3a8)
JReinhold
pushed a commit
that referenced
this pull request
Jun 20, 2023
…as-3-words-name NextJS: fix not loading fonts has 3 (or more) words name (cherry picked from commit 0d7c3a8)
JReinhold
pushed a commit
that referenced
this pull request
Jun 20, 2023
…as-3-words-name NextJS: fix not loading fonts has 3 (or more) words name (cherry picked from commit 0d7c3a8)
JReinhold
pushed a commit
that referenced
this pull request
Jun 20, 2023
…as-3-words-name NextJS: fix not loading fonts has 3 (or more) words name (cherry picked from commit 0d7c3a8)
JReinhold
pushed a commit
that referenced
this pull request
Jun 20, 2023
…as-3-words-name NextJS: fix not loading fonts has 3 (or more) words name (cherry picked from commit 0d7c3a8)
JReinhold
pushed a commit
that referenced
this pull request
Jun 20, 2023
…as-3-words-name NextJS: fix not loading fonts has 3 (or more) words name (cherry picked from commit 0d7c3a8)
JReinhold
pushed a commit
that referenced
this pull request
Jun 21, 2023
…as-3-words-name NextJS: fix not loading fonts has 3 (or more) words name (cherry picked from commit 0d7c3a8)
JReinhold
pushed a commit
that referenced
this pull request
Jun 21, 2023
…as-3-words-name NextJS: fix not loading fonts has 3 (or more) words name (cherry picked from commit 0d7c3a8)
JReinhold
pushed a commit
that referenced
this pull request
Jun 21, 2023
…as-3-words-name NextJS: fix not loading fonts has 3 (or more) words name (cherry picked from commit 0d7c3a8)
JReinhold
pushed a commit
that referenced
this pull request
Jun 21, 2023
…as-3-words-name NextJS: fix not loading fonts has 3 (or more) words name (cherry picked from commit 0d7c3a8)
JReinhold
pushed a commit
that referenced
this pull request
Jun 21, 2023
…as-3-words-name NextJS: fix not loading fonts has 3 (or more) words name (cherry picked from commit 0d7c3a8)
JReinhold
pushed a commit
that referenced
this pull request
Jun 21, 2023
…as-3-words-name NextJS: fix not loading fonts has 3 (or more) words name (cherry picked from commit 0d7c3a8)
JReinhold
pushed a commit
that referenced
this pull request
Jun 21, 2023
…as-3-words-name NextJS: fix not loading fonts has 3 (or more) words name (cherry picked from commit 0d7c3a8)
JReinhold
pushed a commit
that referenced
this pull request
Jun 21, 2023
…as-3-words-name NextJS: fix not loading fonts has 3 (or more) words name (cherry picked from commit 0d7c3a8)
JReinhold
pushed a commit
that referenced
this pull request
Jun 21, 2023
…as-3-words-name NextJS: fix not loading fonts has 3 (or more) words name (cherry picked from commit 0d7c3a8)
JReinhold
pushed a commit
that referenced
this pull request
Jun 21, 2023
…as-3-words-name NextJS: fix not loading fonts has 3 (or more) words name (cherry picked from commit 0d7c3a8)
JReinhold
pushed a commit
that referenced
this pull request
Jun 22, 2023
…as-3-words-name NextJS: fix not loading fonts has 3 (or more) words name (cherry picked from commit 0d7c3a8)
Merged
18 tasks
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
patch:done
Patch/release PRs already cherry-picked to main/release branch
patch:yes
Bugfix & documentation PR that need to be picked to main branch
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.
Closes #22248
What I did
This PR fixes a bug not loading fonts has 3 (or more) words name.
It caused by using
replace
instead ofreplaceAll
when getclassName
from font family name.Before:
![image](https://private-user-images.githubusercontent.com/14973783/246650954-d5928c8b-4298-4c19-8e99-9cc8dd2a5d1f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU5MzgwMDgsIm5iZiI6MTcyNTkzNzcwOCwicGF0aCI6Ii8xNDk3Mzc4My8yNDY2NTA5NTQtZDU5MjhjOGItNDI5OC00YzE5LThlOTktOWNjOGRkMmE1ZDFmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEwVDAzMDgyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNlODhmY2Q3MTQxZjYwMWE3MjQ2ZTNlYWMxYjlhNzdkOTczODg3ODRiM2U3NzdkNWI5ODk1ZmFhMjIwNDIzNDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.W2MlyozLBzwNIaTehZEmtFw47jud_HlHTrfeGOCVtdI)
After:
![image](https://private-user-images.githubusercontent.com/14973783/246650969-5f05a17a-b9e2-402a-933a-d2c1c3c2cde6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU5MzgwMDgsIm5iZiI6MTcyNTkzNzcwOCwicGF0aCI6Ii8xNDk3Mzc4My8yNDY2NTA5NjktNWYwNWExN2EtYjllMi00MDJhLTkzM2EtZDJjMWMzYzJjZGU2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEwVDAzMDgyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI2NmI4NTdlOGQ5YmE4MGIxODI2MjVkZGQ5YzlkMmM3ZWZmZTk2MzIwY2I0YWZmNjFmODExZDMzMGMzYWVjMjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.6l_eaf3FbrTa2N83RLKDWcBe71UhI-u1cL3nZqowEqA)
How to test
nextjs/default-ts
template.NextFont.tsx
andNextFontTest.stories.tsx
as below in same any directory.Checklist
MIGRATION.MD
Maintainers
make sure to add the
ci:merged
orci:daily
GH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]