Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

fix(vite.config.ts): fix font loading bug #294

Merged
merged 2 commits into from
Aug 6, 2022
Merged

fix(vite.config.ts): fix font loading bug #294

merged 2 commits into from
Aug 6, 2022

Conversation

sadiejay
Copy link
Contributor

@sadiejay sadiejay commented Aug 5, 2022

The bug still seems to be present in my local host, but pushing for extras eyes on my code.

fix #243

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Description

This PR fixes the font loading bug.

Related Tickets & Documents

Fixes #243

Mobile & Desktop Screenshots/Recordings

I don't see a change in my local host 😅
Screen Shot 2022-08-05 at 5 29 33 PM

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 README.md
  • 📓 docs.opensauced.pizza
  • 🍕 dev.to/opensauced
  • 📕 storybook
  • 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

No I don't believe so.

[optional] What gif best describes this PR or how it makes you feel?

I know I'm completely supported and standing in like 5 inches of water, and yet... Life as a junior dev I suppose lol
Boy in pool holding on to rope for dear life while legs float up seemingly without his control. Another woman enters frame smiling. She puts the boy's legs down thru the water, then onto the floor of pool revealing he's standing in water that goes up to his knees. He recovers as nonchalantly as possible for a child that was just seeing their brief life flash before their eyes.

The bug still seems to be present in my local host, but pushing for extras eyes on my code.

fix #243
@netlify
Copy link

netlify bot commented Aug 5, 2022

Deploy Preview for hot-sauced-ui ready!

Name Link
🔨 Latest commit ad2c415
🔍 Latest deploy log https://app.netlify.com/sites/hot-sauced-ui/deploys/62edb340fc9f6400083aa504
😎 Deploy Preview https://deploy-preview-294--hot-sauced-ui.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

PR Compliance Checks Passed!

vite.config.ts Outdated
@@ -64,8 +64,8 @@ export default defineConfig(({command, mode}: ConfigEnv): UserConfig => {
display: 'swap',
injectTo: 'head-prepend',
families: [
'Inter:100,200,300,400,500,600,700,800,900',
'Lexend:100,200,300,400,500,600,700,800,900'
'Inter:wght@100,200,300,400,500,600,700,800,900',
Copy link
Contributor

Choose a reason for hiding this comment

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

This should fix it on the deploy preview as well, it was ; instead of ,:

'Inter:wght@400;600;900',
'Lexend:wght@400;600;900'

Copy link
Member

Choose a reason for hiding this comment

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

I would go with this solution rather than mine 😎

vite.config.ts Outdated
Comment on lines 67 to 68
'Inter:wght@100,200,300,400,500,600,700,800,900',
'Lexend:wght@100,200,300,400,500,600,700,800,900'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'Inter:wght@100,200,300,400,500,600,700,800,900',
'Lexend:wght@100,200,300,400,500,600,700,800,900'
// families can be either strings (only regular 400 will be loaded)
'Lexend',
// or objects
{
/**
* Family name (required)
*/
name: 'Inter',
/**
* Family styles
*/
styles: 'ital,wght@0,400;1,200',
/**
* enable non-blocking renderer
* <link rel="preload" href="xxx" as="style" onload="this.rel='stylesheet'">
* default: true
*/
defer: true,
},

So after looking at the project README, this will work. It loads only the 400 or regular version of Lexend, and multiple versions of Inter.

@bdougie
Copy link
Member

bdougie commented Aug 5, 2022

Per mine and @0-vortex's comment. It is indeed not loading, the syntax is off and skipping the fonts. You commit vortex's solution and see it work. Once done we can merge this.

Thanks for looking into this @sadiejay

@sadiejay
Copy link
Contributor Author

sadiejay commented Aug 6, 2022

Screenshot 2022-08-05 at 19-18-17 Hot Open Sauced v2 17 1
🥳🥳🥳

@0-vortex
Copy link
Contributor

0-vortex commented Aug 6, 2022

Screenshot 2022-08-05 at 19-18-17 Hot Open Sauced v2 17 1
🥳🥳🥳

Was just posting a screenshot myself, congrats! Merging this in now 🍕 🚀

@0-vortex 0-vortex merged commit fda8cbe into open-sauced:main Aug 6, 2022
github-actions bot pushed a commit that referenced this pull request Aug 6, 2022
### [2.21.2](v2.21.1...v2.21.2) (2022-08-06)

### 🐛 Bug Fixes

* **vite.config.ts:** correct font loading preload ([#294](#294)) ([fda8cbe](fda8cbe)), closes [#243](#243)
@github-actions
Copy link

github-actions bot commented Aug 6, 2022

🎉 This PR is included in version 2.21.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

0-vortex added a commit that referenced this pull request Aug 6, 2022
* origin/main:
  chore(patch): release 2.21.2 [skip ci]
  fix(vite.config.ts): correct font loading preload (#294)
  chore(patch): release 2.21.1 [skip ci]
  fix: dedupe handleVoteUpdateByRepo function (#292)
  chore(minor): release 2.21.0 [skip ci]
0-vortex added a commit that referenced this pull request Aug 11, 2022
* origin/main: (117 commits)
  chore(patch): release 2.23.3 [skip ci]
  fix: correct swr fetcher not throwing on error (#306)
  chore(patch): release 2.23.2 [skip ci]
  fix: load more doesn't load repositories (#304)
  chore(patch): release 2.23.1 [skip ci]
  fix: dedupe app global user state (#303)
  chore(minor): release 2.23.0 [skip ci]
  feat: change title font to open sans bold (#300)
  chore(minor): release 2.22.0 [skip ci]
  feat: updated css to respect row in subnav (#298)
  feat: use async hooks and beta api for hot repos (#296)
  chore(patch): release 2.21.2 [skip ci]
  fix(vite.config.ts): correct font loading preload (#294)
  chore(patch): release 2.21.1 [skip ci]
  fix: dedupe handleVoteUpdateByRepo function (#292)
  chore(minor): release 2.21.0 [skip ci]
  chore(minor): release 2.20.0 [skip ci]
  feat: make the contributors StackedAvatars component reusable (#290)
  chore(minor): release 2.19.0 [skip ci]
  feat: added system notification (#285)
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Fonts are not loading properly
3 participants