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

perf(theme): prevent loading unnecessary data on a mobile device in A… #620

Merged
merged 1 commit into from
Feb 21, 2022

Conversation

bartoszherba
Copy link
Collaborator

@bartoszherba bartoszherba commented Feb 17, 2022

Description

prevent loading unnecessary data on a mobile device in AppHeader component

  • add @nuxtjs/device package to recognize used device
  • remove the mobile observer from header and replace it with device recognition tool
  • navigation is now lazy-loaded, categories required for navigation are not loaded at all on
    mobile devices

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

packages/theme/components/AppHeader.vue Outdated Show resolved Hide resolved
@bartoszherba bartoszherba force-pushed the M2-185-make-navigation-in-app-header-lazy-loaded branch from e6fe207 to ebf0188 Compare February 18, 2022 13:41
@bartoszherba bartoszherba requested a review from Frodigo February 18, 2022 13:44
@bartoszherba bartoszherba force-pushed the M2-185-make-navigation-in-app-header-lazy-loaded branch 2 times, most recently from 48963e9 to dda4502 Compare February 18, 2022 14:04
Frodigo
Frodigo previously approved these changes Feb 21, 2022
- add @nuxtjs/device package to recognize used device
- remove mobile observer from header and replave it with device recognition tool

- navigation is now lazy loaded, categories required for a navigation are not loaded at all on
mobile devices
@bartoszherba bartoszherba force-pushed the M2-185-make-navigation-in-app-header-lazy-loaded branch from dda4502 to dd167ac Compare February 21, 2022 11:24
@bartoszherba bartoszherba requested a review from Frodigo February 21, 2022 11:31
@Frodigo Frodigo merged commit 9f3447d into develop Feb 21, 2022
@Frodigo Frodigo deleted the M2-185-make-navigation-in-app-header-lazy-loaded branch February 21, 2022 12:25
@bartoszherba bartoszherba restored the M2-185-make-navigation-in-app-header-lazy-loaded branch April 11, 2022 06:49
@Frodigo Frodigo deleted the M2-185-make-navigation-in-app-header-lazy-loaded branch April 20, 2022 04:34
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.

2 participants