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

delay page transition until we have all resources #6158

Merged
merged 1 commit into from
Jun 26, 2018

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Jun 26, 2018

This does couple of things:

  • Gatsby won't navigate to new page until resources for it are loaded (previously path would change after 1s even if resources are not yet loaded, so this would cause scroll jump without page change)
  • If navigating to path that doesn't exist, it will wait to load resources for 404 page (to avoid similiar scroll jump as in point above)
  • Adds new browser APIs, so loading indicators can be implemented without hooking into Gatsby internal messages

Closes #3372

@gatsbybot
Copy link
Collaborator

Deploy preview for using-drupal ready!

Built with commit c03ec83

https://deploy-preview-6158--using-drupal.netlify.com

@gatsbybot
Copy link
Collaborator

Deploy preview for gatsbygram ready!

Built with commit c03ec83

https://deploy-preview-6158--gatsbygram.netlify.com

Copy link
Contributor

@m-allanson m-allanson left a comment

Choose a reason for hiding this comment

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

👍 LGTM!

@m-allanson m-allanson merged commit 5150616 into gatsbyjs:master Jun 26, 2018
@KyleAMathews
Copy link
Contributor

Great work @pieh!

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