t4-app icon indicating copy to clipboard operation
t4-app copied to clipboard

[web] Themes are not propagating properly when providers are in separate files

Open hdwatts opened this issue 2 years ago • 6 comments

I've opened a Tamagui issue here: https://github.com/tamagui/tamagui/issues/1718 And a reproduction repo here: https://github.com/hdwatts/tamagui-playground

The repro isn't a t4-app, but I confirmed that adding switches and the theme toggle to the home screen in a fresh t4-app will lead to this same issue.

For now I may recommend combining the theme/tamagui providers and can open a PR if you agree.

hdwatts avatar Sep 28 '23 02:09 hdwatts

I have previously raised a similar issue, and for clarity, I am providing the link to it.

timothymiller avatar Sep 28 '23 04:09 timothymiller

@hdwatts This is a bug that affects Tamagui so we should track your issue https://github.com/tamagui/tamagui/issues/1718 and https://github.com/tamagui/tamagui/issues/1319.

The real bug for t4-app is that the bottom sheet doesn't change color

https://github.com/timothymiller/t4-app/assets/57916483/63b9f9c0-1bcb-4f31-8846-be7860bdb8ab

@timothymiller I can commit this theme toggle component if that's something we want out of the box.

albbus-stack avatar Nov 01 '23 18:11 albbus-stack

@albbus-stack I love the theme toggle let's add it!

timothymiller avatar Nov 01 '23 22:11 timothymiller

Re: the original issue, I've tested this on native & web, and the issue only seems to persist on web. FWIW

timothymiller avatar Nov 02 '23 07:11 timothymiller

Dude, the issue was the dependency array was incomplete. Biome lint helped uncover the issue. Total cringe bro.

timothymiller avatar Nov 08 '23 06:11 timothymiller

Seems like this issue has resurfaced

timothymiller avatar Jan 03 '24 01:01 timothymiller