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

Connect dark/light mode switch to user settings #62

Open
kgilles opened this issue Jan 23, 2024 · 5 comments
Open

Connect dark/light mode switch to user settings #62

kgilles opened this issue Jan 23, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@kgilles
Copy link
Member

kgilles commented Jan 23, 2024

The current dark/light mode switch value is stored in local storage. This can cause flickering or other imperfections on initial page renders. To enable us from loading the correct styles from the server we need to connect the dark/light mode value to the user's settings. Specifically the theme user setting.

@kgilles kgilles converted this from a draft issue Jan 23, 2024
@kgilles kgilles added enhancement New feature or request good first issue Good for newcomers labels Jan 23, 2024
@chasingtheflow chasingtheflow self-assigned this Jan 30, 2024
@chasingtheflow
Copy link
Contributor

@kgilles It doesn't appear that the site even allows a user to log in yet? Is that accurate or am I overlooking how to create and log in as a user?

I could update it to leverage Prefers Color Scheme though? Which may resolve the flickering and give the site a usable default until logins are supported and then we could have the DB value supersede the browser preference?

@kgilles kgilles moved this from 📋 Backlog to 🆕 New in Sublinks Frontend Jan 30, 2024
@kgilles kgilles moved this from 🆕 New to 📋 Backlog in Sublinks Frontend Jan 30, 2024
@kgilles
Copy link
Member Author

kgilles commented Jan 30, 2024

@chasingtheflow This is in Backlog while waiting for the user auth stuff to be completed in issue #13

I could update it to leverage Prefers Color Scheme though? Which may resolve the flickering and give the site a usable default until logins are supported and then we could have the DB value supersede the browser preference?

Sounds good to me. Feel free to give it a go.

@kgilles kgilles moved this from 📋 Backlog to 🔖 Ready in Sublinks Frontend May 7, 2024
@kgilles
Copy link
Member Author

kgilles commented May 7, 2024

@chasingtheflow User auth has been connected. When you use the Docker dev setup there are a bunch of seeded users all with the same password ready for you. You can also register a new user if you prefer.

@chasingtheflow
Copy link
Contributor

Hey do we have a design doc or something that we're working towards?

@kgilles
Copy link
Member Author

kgilles commented May 7, 2024

Not yet. We have a couple colors and sizes in the Tailwind config but nothing truly set in stone.
@Ategon is working on a bunch of such improvements and when they're introduced we'll start locking things down in terms of designs.

@kgilles kgilles moved this from 🔖 Ready to ✅ Done in Sublinks Frontend Jun 15, 2024
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
Status: ✅ Done
Development

No branches or pull requests

2 participants