Skip to content

Conversation

bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Sep 28, 2017

Adds the gatsby-plugin-nprogress plugin (which displays the npgoress loading bar if a page takes longer than a second to load.)

This might fix the nit you mentioned, @gaearon. Let's see how it looks when Netlify adds a preview link. (Kyle also recommended this plug-in a time or two. Gatsby uses it on its own website.)

@reactjs-bot
Copy link

reactjs-bot commented Sep 28, 2017

Deploy preview ready!

Built with commit 854b466

https://deploy-preview-10917--reactjs.netlify.com

@bvaughn bvaughn force-pushed the gatsby-plugin-nprogress branch from d652a29 to 9c3de4a Compare September 28, 2017 15:52
@gaearon
Copy link
Collaborator

gaearon commented Sep 28, 2017

Hmm. I still see about a 1s block until it simultaneously shows the loading indicator and switches the tab.

@Mathspy
Copy link

Mathspy commented Sep 28, 2017

Hmm. I still see about a 1s block until it simultaneously shows the loading indicator and switches the tab.

The 1 second delay is actually intentional

Automatically shows the nprogress indicator when a page is delayed in loading (which Gatsby considers as one second after clicking on a link).

~from the docs

@KyleAMathews
Copy link
Contributor

If the "nit" was it's slow clicking on the blog link, this PR fixes that gatsbyjs/gatsby#2264

@bvaughn
Copy link
Contributor Author

bvaughn commented Sep 28, 2017

I think this plugin is probably still worth adding for other cases than the blog redirect. I'll update this PR to 1.9.49 too though to pull in the Gatsby fix. 😄

@KyleAMathews
Copy link
Contributor

Yeah on slow 3g, Gatsby often can't quite load new pages fast enough so the progress indicator is nice. On anything faster, new pages are almost always loaded by the time you click on a link.

@gaearon
Copy link
Collaborator

gaearon commented Sep 28, 2017

I kinda miss the "wow" reaction from FB on GitHub because I'd totally "wow" how fast you fixed gatsbyjs/gatsby#2264. 😛

@gaearon
Copy link
Collaborator

gaearon commented Sep 28, 2017

@gaearon
Copy link
Collaborator

gaearon commented Sep 28, 2017

Can we force the bot to redeploy?

@KyleAMathews
Copy link
Contributor

It does automatically on git pushes so the site's already rebuilt https://deploy-preview-10917--reactjs.netlify.com/

@bvaughn
Copy link
Contributor Author

bvaughn commented Sep 28, 2017

It's already re-deployed.

@bvaughn
Copy link
Contributor Author

bvaughn commented Sep 28, 2017

One way to make the progress bar show is to load the site in an incognito tab and then just click around really quickly before Gatbsy has had a chance to preload anything.

@KyleAMathews
Copy link
Contributor

The network tab in chrome lets you throttle the network speed as well.

@bvaughn
Copy link
Contributor Author

bvaughn commented Sep 28, 2017

Good call. I often forget about that.

Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

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

LG

@bvaughn bvaughn merged commit a7a4361 into gatsby Sep 28, 2017
@bvaughn bvaughn deleted the gatsby-plugin-nprogress branch September 28, 2017 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants