Skip to content

Conversation

@bartoszherba
Copy link
Collaborator

@bartoszherba bartoszherba commented Feb 17, 2022

Description

  • update social icons to reduce weight and increase the quality
  • load footer only when visible

Related Issue

Motivation and Context

Refactoring and performance improvement

How Has This Been Tested?

Observe networking if the footer is loaded only when visible

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.

@bartoszherba bartoszherba requested a review from Frodigo February 17, 2022 14:12
@bartoszherba bartoszherba force-pushed the M2-181-make-app-footer-lazy-loaded branch from 92dde94 to bb534cd Compare February 17, 2022 14:17
let observer = null;
if (process.browser && ('IntersectionObserver' in window)) {
observer = new IntersectionObserver((entries) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add the rootMargin prop and bind it to IntersectionObserver initialization?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

cool, thx

</div>
<BottomNavigation />
<AppFooter />
<LoadWhenVisible>
Copy link
Contributor

Choose a reason for hiding this comment

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

When you add rootMargin option, please set up it here. Please try 100px 0 0 0.

Thanks to that footer should be shown a little bit earlier, and UX will be better.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oki

- update social icons to reduce weight and increase quality
- load footer only when visible
@bartoszherba bartoszherba force-pushed the M2-181-make-app-footer-lazy-loaded branch from bb534cd to 83ccb19 Compare February 18, 2022 07:33
@Frodigo Frodigo self-requested a review February 18, 2022 11:32
@Frodigo Frodigo merged commit 1a00a39 into develop Feb 18, 2022
@Frodigo Frodigo deleted the M2-181-make-app-footer-lazy-loaded branch February 18, 2022 11:33
@bartoszherba bartoszherba restored the M2-181-make-app-footer-lazy-loaded branch April 11, 2022 06:49
@Frodigo Frodigo deleted the M2-181-make-app-footer-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.

3 participants