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

Automatic light and dark mode switching with schedule #284

Open
mrr0b0t-0x1 opened this issue Dec 7, 2024 · 17 comments
Open

Automatic light and dark mode switching with schedule #284

mrr0b0t-0x1 opened this issue Dec 7, 2024 · 17 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mrr0b0t-0x1
Copy link

Hi @XengShi,

I use Firefox and I have an extension which automatically switches my browser theme between light and dark modes depending on the set schedule. But I cannot find the setting to do the same with the new tab page.

Do you have any plan to introduce automatic light and dark mode settings with customizable colors and schedule for both the modes?

P.S. If this is not in the pipeline, I'll be happy to help ;)

@itz-rj-here
Copy link
Collaborator

@prem-k-r

@XengShi
Copy link
Owner

XengShi commented Dec 8, 2024

That’s a great idea! It’s not in the pipeline right now, but I’d be happy if you’d like to contribute.

@itz-rj-here itz-rj-here added the enhancement New feature or request label Dec 29, 2024
@itz-rj-here
Copy link
Collaborator

@prem-k-r we can do this i think

@prem-k-r
Copy link
Collaborator

yeah

@itz-rj-here
Copy link
Collaborator

yeah

I neeed a concept idea for it.

@prem-k-r
Copy link
Collaborator

yeah

I neeed a concept idea for it.

we can add a toggle but I'm not sure what to do about user setting the time manually.

@itz-rj-here
Copy link
Collaborator

@XengShi can you say something or show us a concept idea for it please.

@Thunder-Blaze
Copy link
Contributor

I think it's about time we should have a completely different settings page with different tabs for different settings ?
then we can add more and more personalization options later without cluttering the UI ?

and we have been saving a lot of setting data items to local storage
how about we make a json of those and then store that single json as string rather than storing each item ?

@prem-k-r
Copy link
Collaborator

prem-k-r commented Dec 29, 2024

yes, we should

categories in menu something like #100 (comment)

@itz-rj-here
Copy link
Collaborator

I think it's about time we should have a completely different settings page with different tabs for different settings ? then we can add more and more personalization options later without cluttering the UI ?

and we have been saving a lot of setting data items to local storage how about we make a json of those and then store that single json as string rather than storing each item ?

Thats a great idea actually.

@Thunder-Blaze
Copy link
Contributor

yes, we should

categories in menu something like #100 (comment)

yep something like that but with a little better design

@shubham29pathak
Copy link

nice idea @mrr0b0t-0x1

inpiring...

@prem-k-r
Copy link
Collaborator

I tried with hard coded time.. but it's buggy lol... thought it will be simple
image

according to chatgpt my logic seems okish ig:
Save Current Non-Dark Theme: Before switching to dark mode, the currently selected non-dark theme (like orange, pink, etc.) is saved to localStorage. This happens only if you're on a non-dark theme.
Apply Last Non-Dark Theme: When switching back from dark mode, the code retrieves the saved theme from localStorage. If no theme is stored, it defaults to 'blue'.
Excluding Dark Theme in Selection: The code ensures that the dark theme (#darkTheme) is never included in the set of non-dark themes.

@jeetpatel5767
Copy link

we can also add somthing like you open google or a new tab in google you will get diffrent colour every time

@prem-k-r prem-k-r added the good first issue Good for newcomers label Jan 21, 2025
@Coderxrohan
Copy link

Coderxrohan commented Jan 27, 2025

I am currently working on this feature. I have tested it out, and it works good!
But as a fresher contributor or beginner in github, I need someone who can tell me what to do next. so that I can make changes.
Have a look at it...

-------Features-----

  1. Auto-enable dark mode.
  2. User Editable

-------Improvemnts--------

  1. Auto dark mode should be hidden in dark mode on Google. If the user wants dark mode, only then will the Dakt mode schedule option be visible. This will save space in the control panel of the extension.
  2. If any other, please suggest.
    Image
    Image

@Coderxrohan
Copy link

406674378-5def1368-0ff1-47fa-a774-75f88fdad3e3.mp4

@shubham29pathak
Copy link

@Coderxrohan thats great dude, It looks cool too...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

8 participants