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

improved theme selector #44

Open
2 tasks
kirandash opened this issue Jun 19, 2023 · 2 comments
Open
2 tasks

improved theme selector #44

kirandash opened this issue Jun 19, 2023 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@kirandash
Copy link
Member

Currently the light theme is default and user can use the toggle switch to switch between themes

Change Request:

  • The default theme should be based on users default color scheme (can use media query prefers-color-scheme)
  • If user uses the toggle theme button, please save the selected theme details in IndexedDB and now if user loads the page, the selectedTheme should load from storage

Packages to use: https://github.com/dexie/Dexie.js for IndexedDB wrapper and https://www.npmjs.com/package/fake-indexeddb for unit testing

@kirandash kirandash added enhancement New feature or request help wanted Extra attention is needed labels Jun 19, 2023
@kirandash kirandash changed the title improved dark and light theme improved theme selector Jun 19, 2023
@lausuarez02
Copy link
Contributor

Hey Kirandash,
I'll leave an article that can be helpful:https://medium.com/hypersphere-codes/detecting-system-theme-in-javascript-css-react-f6b961916d48
And then i'm curious on why you want to use Dexie's for.
Thanks!

@kirandash
Copy link
Member Author

Hey Kirandash,

I'll leave an article that can be helpful:https://medium.com/hypersphere-codes/detecting-system-theme-in-javascript-css-react-f6b961916d48

And then i'm curious on why you want to use Dexie's for.

Thanks!

Dexie is an indexedDB wrapper. there are other alternatives too but dexie should be good enough for our requirement

bdw: just saving the data to localStorage should be good enough. but I thought we can try and implement indexedDB since that's the best storage option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants