expressjs / expressjs.com

https://expressjs.com
Other
5.22k stars 1.41k forks source link

Dark Mode flash #1508

Open jonchurch opened 2 months ago

jonchurch commented 2 months ago

There's a flash on page load when user has dark mode set

We can inline the css and js to set up the page before it's rendered to the browser

Slowed down w/ connection throttling: flash related #1490

crandmck commented 1 month ago

@chrisdel101

chrisdel101 commented 1 month ago

Thanks for the feedback. I think there might be an influx of bug reports on this one, which I thought would be the case.

I did notice this but didn't realize it would be such an issue. I can make this fix. Do you have any tips on the best way to fix it?

jonchurch commented 1 month ago

No worries @chrisdel101, you made a good change, and issues will come in identifying gaps. Power of the crowd! If you want to hack on this please do, others may want to fix some of the rough edges too. If we didn't like the change we would just revert it.

chrisdel101 commented 1 month ago

Thank @jonchurch! I will hack.

chrisdel101 commented 1 week ago

There appears to be some issue specifically with the GH pages build of this site. #1524 should have fixed it but did not. If there is someway to re-build the production branch maybe this would fix it?

I've setup a fork version of the express site also using GH pages with my local account and the flash does not appear to occur there: https://chrisdel101.github.io/my-expressjs.com/

crandmck commented 4 days ago

Wow, that's weird. I honestly don't know how that could happen.

The only thing I can think of is turning off GHP and then turning it back on. That would bring the site down momentarily... Should I try that?

chrisdel101 commented 4 days ago

Maybe it will fix on the next PR that gets pushed as this will reload it then? I noticed #1526 is fixed but I don't see how it got fixed. Might be the same kind of thing (unless a fix was applied to #1526 that I just can't see). You can see the nav flash still happens on the link above.