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 Font render blocking #90

Merged
merged 4 commits into from
Apr 17, 2024
Merged

Conversation

habib-deriv
Copy link
Contributor

Font's are render blocking resources as they are being called from CSS. Instead, we're calling it from index.html

Screenshot 2024-04-09 at 11 09 45 AM

Copy link

cloudflare-workers-and-pages bot commented Apr 9, 2024

Deploying traders-hub with  Cloudflare Pages  Cloudflare Pages

Latest commit: eea1bfa
Status: ✅  Deploy successful!
Preview URL: https://003a07d7.traders-hub.pages.dev
Branch Preview URL: https://pr-90.traders-hub.pages.dev

View logs

@coveralls
Copy link

coveralls commented Apr 9, 2024

Pull Request Test Coverage Report for Build 8715924219

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 119 unchanged lines in 14 files lost coverage.
  • Overall coverage decreased (-1.9%) to 49.673%

Files with Coverage Reduction New Missed Lines %
src/cfd/screens/EnterPassword/EnterPassword.tsx 4 29.63%
src/components/OptionsAndMultipliersSection/OptionsAndMultipliersContent/OptionsAndMultipliersContent.tsx 6 15.0%
src/cfd/constants/constants.tsx 6 61.54%
src/components/CurrencySwitcher/CurrencySwitcher.tsx 6 16.13%
src/cfd/flows/MT5/AvailableMT5AccountsList/AvailableMT5AccountsList.tsx 7 20.0%
src/cfd/flows/MT5/LoggedOutMT5AccountsList/LoggedOutMT5AccountsList.tsx 7 33.33%
src/cfd/flows/CTrader/AvailableCTraderAccountsList/AvailableCTraderAccountsList.tsx 8 25.0%
src/cfd/flows/OtherCFDs/Dxtrade/AvailableDxtradeAccountsList/AvailableDxtradeAccountsList.tsx 8 29.41%
src/cfd/flows/MT5/MT5AccountIcon.tsx 8 16.67%
src/cfd/modals/MT5PasswordModal/MT5Success.tsx 8 17.65%
Totals Coverage Status
Change from base Build 8609300974: -1.9%
Covered Lines: 1277
Relevant Lines: 2105

💛 - Coveralls

@habib-deriv habib-deriv force-pushed the habib/font-render-blocking-fix branch from 261bbc3 to 01dc446 Compare April 9, 2024 03:20
Copy link
Contributor

@sergei-deriv sergei-deriv left a comment

Choose a reason for hiding this comment

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

Looks like on the testlink we have another font

Testlink:
image

Localhost:
image

@habib-deriv
Copy link
Contributor Author

Looks like on the testlink we have another font

Testlink: image

Localhost: image

Is this system font? I don't find anywhere int he code

Copy link
Contributor

@sergei-deriv sergei-deriv left a comment

Choose a reason for hiding this comment

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

I see on your testlink this error:

image

Google advice to download fonts in index.html like this:

<link rel="preconnect" href="https://fonts.googleapis.com" />
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
        <link
            href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap"
            rel="stylesheet"
        />

Also I noticed we are using components from deriv-com/ui and we uses the same font there (https://github.com/deriv-com/ui/blob/main/src/styles/abstracts/_variables.scss). In result we downloaded the same font 2 times (one time in index.html and 2nd time in css from deriv-com/ui)

Copy link

Preview Link: https://pr-90.traders-hub.pages.dev

Name Result
Build status Completed ✅
Preview URL Visit Preview
Action URL Visit Action

@thisyahlen-deriv thisyahlen-deriv merged commit 58a8408 into main Apr 17, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants