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

STRF-4146: Don't lazy load logo if size is unknown #1213

Merged
merged 1 commit into from
Apr 27, 2018
Merged

STRF-4146: Don't lazy load logo if size is unknown #1213

merged 1 commit into from
Apr 27, 2018

Conversation

mattolson
Copy link
Contributor

What?

  • Our lazy loading solution relies on advance knowledge of the image dimensions. When logo_size is set to original in the theme settings, we don't have this information. For large logos, this leads to overlapping of the menu.
  • For original sized images, don't use lazy loading or reserving space for the image via absolute positioning. Hopefully not many users will use this setting because it will impact frontend performance. To partially mitigate this, I reordered the options for logo_size so our optimized setting appears first in the list.
  • The large diff in schema.json is due to changing the line endings from dos to unix. The only change of substance is reordering the options for logo_size

Tickets / Documentation

Screenshots

Before

screen shot 2018-04-27 at 11 16 06 am

After

With "original" sized logo (desktop)

screen shot 2018-04-27 at 11 09 54 am

With "original" sized logo (mobile)

screen shot 2018-04-27 at 11 10 52 am

With "optimized for theme" sized logo (250x100) (desktop):

screen shot 2018-04-27 at 11 11 37 am

With "optimized for theme" sized logo (250x100) (mobile):

screen shot 2018-04-27 at 11 14 10 am

@bigbot
Copy link

bigbot commented Apr 27, 2018

Autotagging @bigcommerce/storefront-team @davidchin

* Our lazy loading solution relies on advance knowledge of the image
  dimensions. When `logo_size` is set to `original` in the theme
  settings, we don't have this information. For large logos, this
  leads to overlapping of the menu.
* For original sized images, don't use lazy loading or reserving
  space for the image via absolute positioning. Hopefully not many
  users will use this setting because it will impact frontend performance.
  In order to hopefully minimize this, I reordered the options for
  logo_size so our optimized setting appears first in the list.
@mattolson mattolson merged commit 81d24b5 into bigcommerce:master Apr 27, 2018
@mattolson mattolson deleted the STRF-4146 branch April 27, 2018 18:45
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.

3 participants