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

Remove Oswald logo font to reduce number of unique fonts, improve pe… #1375

Merged
merged 1 commit into from Nov 28, 2018

Conversation

Projects
None yet
4 participants
@bookernath
Copy link
Contributor

bookernath commented Oct 31, 2018

…rformance

What?

Most stores will upload a logo image, so having a unique font just for the text logo is a waste of bandwidth in the browser.

Changing logo font to one of the existing fonts to reduce download and lookups of fonts.

Tickets / Documentation

Screenshots (if appropriate)

image

@bigbot

This comment has been minimized.

Copy link

bigbot commented Oct 31, 2018

@bookernath bookernath force-pushed the bookernath:STRF-4616 branch from 51fdcc7 to dfbd2ff Oct 31, 2018

@mattolson
Copy link
Member

mattolson left a comment

We should note that this is a breaking change of sorts. It's not serious, but here is the scenario: If someone is using a logo font, their current configuration is set to use one of Google_Oswald_400 or Google_Oswald_300. When they upgrade Cornerstone, their configuration will be using a value that no longer exists in the theme, so the next time they use Theme Editor / Store Design, it will select one of the new values by default (probably Google_Montserrat_400 because it is listed first), and when they save, it will save that value.

We have to be comfortable with the logo font for stores changing after upgrade and upon the next Theme Editor save in order to proceed with this PR.

We should test this upgrade behavior as well to make sure I've described it accurately.

@bookernath bookernath force-pushed the bookernath:STRF-4616 branch from dfbd2ff to 84e5241 Nov 9, 2018

@bookernath bookernath force-pushed the bookernath:STRF-4616 branch from 84e5241 to e1e457e Nov 20, 2018

@bookernath

This comment has been minimized.

Copy link
Contributor Author

bookernath commented Nov 20, 2018

I have updated this PR to make it a less breaking change, by keeping the original fonts around as selectable options.

@mattolson
Copy link
Member

mattolson left a comment

This still doesn't guarantee that we'll end up with only two fonts on the page. There are many font options available for different font settings, and we will always load the union of all the font selections.

Another approach would be to eliminate this setting entirely and change the CSS to use one of the other font settings, such as headings-font: https://github.com/bigcommerce/cornerstone/blob/master/schema.json#L134

@bookernath bookernath force-pushed the bookernath:STRF-4616 branch from e1e457e to 8450db6 Nov 27, 2018

@bookernath

This comment has been minimized.

Copy link
Contributor Author

bookernath commented Nov 27, 2018

@mattolson ♻️

@mattolson
Copy link
Member

mattolson left a comment

LGTM. @Ubersmake Can you test this out and confirm my understanding of the configuration upgrade process?

@bookernath bookernath force-pushed the bookernath:STRF-4616 branch from 8450db6 to 9f8d48a Nov 28, 2018

@mattolson

This comment has been minimized.

Copy link
Member

mattolson commented Nov 28, 2018

@bookernath Needs rebase

@Ubersmake

This comment has been minimized.

Copy link
Contributor

Ubersmake commented Nov 28, 2018

💚

@bookernath bookernath force-pushed the bookernath:STRF-4616 branch from 9f8d48a to df1d74a Nov 28, 2018

Change default logo font to reduce number of unique fonts, improve pe…
…rformance

Most stores will update a logo image, so having a unique font just for the text logo is a waste of performance in the browser.

Changing logo font to one of the existing fonts to reduce download and lookups of fonts.

@bookernath bookernath force-pushed the bookernath:STRF-4616 branch from df1d74a to 11b77c9 Nov 28, 2018

@bookernath bookernath changed the title Change default logo font to reduce number of unique fonts, improve pe… Remove Oswald logo font to reduce number of unique fonts, improve pe… Nov 28, 2018

@mattolson mattolson merged commit bc4f7ab into bigcommerce:master Nov 28, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@bookernath bookernath deleted the bookernath:STRF-4616 branch Nov 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment