GithubHelp home page GithubHelp logo

Comments (2)

onemen avatar onemen commented on May 18, 2024

I see the same on Windows.

changing system theme only apply to the App after F5

more related issues:

  • switching theme in the App does not change the value of CH-prefers-color-scheme, is this by design ?, I only see a change in the _session cookie.
  • when user log out the App removes the _session cookie and the theme revert back to system theme from CH-prefers-color-scheme value.

from epic-stack.

kentcdodds avatar kentcdodds commented on May 18, 2024

You're right, that was a mistake. A fix has been pushed.

switching theme in the App does not change the value of CH-prefers-color-scheme

This is correct. That cookie value is only about what the user's prefers-color-scheme value is. That's the fallback value provided their preference is "system." Their preference is stored in the session.

when user log out the App removes the _session cookie and the theme revert back to system theme from CH-prefers-color-scheme value.

This is a good point. We should probably have a separate cookie for the user's color scheme preference. But it's not the same as CH-prefers-color-scheme. The distinction is important:

  1. CH-prefers-color-scheme: The user's system color scheme preference
  2. Our new cookie (maybe simply theme?): The user's preference for our app. When "system", we reference the CH-prefers-color-scheme value.

This So yes, this is a bug and should be fixed by adding a separate cookie for managing the theme. No need to sign it either. It can be a raw value.

from epic-stack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.