Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force Dark Theme #615

Open
hirenshah opened this issue Dec 27, 2024 · 4 comments
Open

Force Dark Theme #615

hirenshah opened this issue Dec 27, 2024 · 4 comments
Labels
type:feature_request Feature request

Comments

@hirenshah
Copy link

hirenshah commented Dec 27, 2024

Is there a variable or something that forces the dark theme irrespective of browser/platform settings?

I just noticed the Change Log states:

Light theme support: The app now automatically applies the theme based on your browser preferences

My Chrome is set to Dark but WebHook Tester v2.0.1 is Light themed:
image

image

@tarampampam
Copy link
Owner

Could you please take a screenshot of this page in your browser?

https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme

The area of interest is this one:
image

Since theming relies on prefers-color-scheme, you might need to enable the dark theme not only in your browser but also in your OS settings. By the way, which OS are you using?

@hirenshah
Copy link
Author

Ahh, I didn't realise I had to set both OS (Windows 11) and Browser (Chrome) to Dark Mode. As soon as I changed the setting in Windows the theme switched to the dark one.

It would still be nice to have forcing of light or dark as a configurable option.

I thought I could tweak it myself by using --use-live-frontend but couldn't figure out how to use that option with a Docker Compose.

@tarampampam
Copy link
Owner

It would still be nice to have forcing of light or dark as a configurable option.

That said, it's quite challenging to implement. The "force" environment/cli flag would need to be parsed on the backend, passed to an HTTP endpoint, read by the frontend after the HTTP call, and only then applied to the styling options. It's a rather complicated process.

Especially since operating systems and browsers already have their own mechanisms for enforcing dark themes. Forcing a theme purely on the frontend is possible, but it can cause issues with elements like SVG images (which often have their own theming), icons, and similar components, leading to a less polished appearance.

In any case, I'll consider adding a theme toggler to the UI, but it will be a low-priority task. Does that sound okay?

@tarampampam tarampampam added the type:feature_request Feature request label Dec 27, 2024
@hirenshah
Copy link
Author

Of course, this is purely a cosmetic request with little to no benefit - it should go to the bottom of the pile.

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature_request Feature request
Projects
None yet
Development

No branches or pull requests

2 participants