#Dark mode class goes away...

19 messages · Page 1 of 1 (latest)

median wind
#

The dark class on <html class="" goes away between page navigation. When the page is initially loaded it exists but when I (or anyone else) navigate to another page this class is removed.

Anyone else experience this? Ref issue: https://github.com/alexjustesen/speedtest-tracker/issues/2029

GitHub

Describe the bug Since updating to 1.2.1, any section I click on the left side navbar results in a switch to light mode, singeing my retinas. The initial dashboard page loads in dark theme but any ...

mint domeBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

lofty berry
#

Sounds like something is blocking / slowing down the js on the pages. That attribute is handled by alpine.

median wind
lofty berry
#

Check the waterfall in dev tools to see if there’s any other blocking js. It wouldn’t throw an error, but can delay execution time on the main thread.

#

My guess is a third party script that is initializing slowly for some reason.

median wind
#

Nothing stands out, I can see the livewire update, the fetch for the next page and then the avatar being loaded.

lofty berry
#

Hmm. That’s the only thing that comes to mind. Sorry. Haven’t actually experienced the issue.

#

Unless they somehow have cache disabled in their browser and a slow connection I just don’t see how it would be a problem. I don’t think it’s filament bug though. Since filament is doing the same thing as most other sites for handling light/dark mode with tailwind.

#

Have you been able to reproduce it locally?

median wind
#

Which is what's throwing me for a loop too, I'm able to reproduce it locally with both Chrome, Edge and FF. If I disable spa() because it's a full load its fine.

lofty berry
#

Ah. Didn’t know spa was being used. But that still doesn’t make sense because alpine knows the state since it’s in alpine’s storage.

#

That makes me wonder if it’s a deeper level bug.

#

There’s still a lot of issues with spa mode in livewire. Could be something there.

median wind
#

I think I got it, livewire update was the cuplrit. v3.5.19 the bug exists, downgraded to v3.5.18 and it works as expected

lofty berry
#

Not 💯 sure though.

#

Hmm. Yea, there was some issues with LW where we had to lock down the version in filament, but iirc those have since been fixed and resolved.

median wind
#

I just noticed that too, I'm going to remove my dep reference and roll with the Filament specified version