Closed lucasjohnston closed 5 years ago
Have you tried using the size prop in the font awesome component to fix the github icon issue.
@t2ca I don’t believe so (I’ll have a look tomorrow though), but even if that were the case the illustration image and some parts of the css like the logo and shadows are being loaded first
Just did a preliminary check, this is what the page looks like without JavaScript. That explains the flicker (till the JavaScript loads). Cloning the source and taking a deeper look now.
Just took a look at the source and it seems that the sidebar is only made visible on componentDidMount
. componentDidMount
doesn't get called during SSR and hence the built site (using gatsby build
) doesn't have the sidebar and looks like the image attached above. Once the JavaScript loads and componentDidMount is called (after mount) the sidebar is then rendered (isSidebarVisible
is set to true
)
This is what is causing the jank (please correct me if I am misunderstanding your question)
Ahh right - that makes a lot of sense. Thanks for looking into this @sidharthachatterjee 👍
Description
I'm experiencing some rather unpleasant FOUC on loading our Progression Framework site (progression.monzo.com).
In past issues, it seems
styled-components
plugins were the issue, but it looks okay:Others also had this issue when touching the same API methods as the plugin does, but I'm not touching
onCreateBabelConfig
which is the only API method I can see. I'm also not using Material UI, Redux, or any other framework for this project.(Apologies if I'm doing something obviously wrong or noobish here, this is my first real Gatsby project!)
Steps to reproduce
You can view the page here - progression.monzo.com And see the source code here - monzo/progression-framework
Expected result
The page loads beautifully ✨
Actual result
Images (including
font-awesome
logos) load first, followed by text around 2 seconds in. I've attached the Chrome Performance view to this too.Environment