Git Product home page Git Product logo

Comments (12)

Atinux avatar Atinux commented on July 28, 2024 3

Actually, we discussed with Pooya and since we won't support many storage, we could have remember: false option (default to true)

from color-mode.

Atinux avatar Atinux commented on July 28, 2024

Hi @markusressel

The cookie is a functional one, not related to user tracking at all, so there should not be any problem regarding it

from color-mode.

markusressel avatar markusressel commented on July 28, 2024

I don't have the link handy, but what I have read so far wasn't exactly clear on whether this counts as functional or not, so I wanted to be on the safe side. Afaik even a simple language setting does not count as functional. Do you happen to know of websites that do this? Or have a source that is trustworthy?

from color-mode.

pi0 avatar pi0 commented on July 28, 2024

checking last code, are we still using cookies? /cc @Atinux (https://github.com/nuxt-community/color-mode-module/blob/master/lib/templates/plugin.client.js)


Regarding cookies, Language and color seems to be same category (preferences/functionality)

https://gdpr.eu/cookies
Preferences cookies โ€” Also known as โ€œfunctionality cookies,โ€ these cookies allow a website to remember choices you have made in the past, like what language you prefer, what region you would like weather reports for, or what your user name and password are so you can automatically log in.

If you are sure (*) no notice is required for lang, it should be fine. Only i guess max 12M ttl is important.

(*) Receive usersโ€™ consent before you use any cookies except strictly necessary cookies.

from color-mode.

markusressel avatar markusressel commented on July 28, 2024

checking last code, are we still using cookies?

Well it's not a cookie but a local storage entry. But that is irrelevant, the GDPR doesn't specifically target cookies only.

(*) Receive usersโ€™ consent before you use any cookies except strictly necessary cookies.

I mean, thats the tricky part for me ๐Ÿ˜„ Beeing able to set a theme imo isn't strictly necessary. It's a convenience feature. Without nuxt color mode my whole site could be used without anything stored anywhere. Thats my goal :)

from color-mode.

Atinux avatar Atinux commented on July 28, 2024

I see, in that case you should not even display the color switcher until the user approved the consent banner right?

from color-mode.

markusressel avatar markusressel commented on July 28, 2024

Again, as mentioned in OP, I would like to let users select a theme, even if it is only used for their current session and not persisted. This is currently not possible, because setting a theme value also sets a cookie. I should probably make the user aware of that with a little tooltip or something, but thats for me to decide.

The theme selection could (and imo should) be fully functional without the cookie, it just doesn't persist for the next session. I think this is a use case that would be beneficial to all GDPR compliant sites. But of course its not a huge issue or anything. I thought it might be pretty easy to separate the cookie from the current theme selection so I asked.

from color-mode.

Atinux avatar Atinux commented on July 28, 2024

From what I see, we could have an option to disable storing the theme into the localStorage but only in memory.

Something like:

export default {
  colorMode: {
    storage: 'memory' // default: 'localStorage'
  }
}

Would that work for you?

But if using the localStorage for this is fine and does not need any GPDR approval, then no need to add such feature.

from color-mode.

markusressel avatar markusressel commented on July 28, 2024

Yes, I think this would work.

It would also be great if it were possible to change this after the fact using javascript.

Something like this (storage initially set to memory):

$colorMode.storage = 'localStorage'
$colorMode.preference = currentSelection

from color-mode.

Atinux avatar Atinux commented on July 28, 2024

How comfortable are you to open a PR?

from color-mode.

markusressel avatar markusressel commented on July 28, 2024

Would also work ๐Ÿ‘

I am not sure if I can find the time to deep dive into the repository and change something without breaking things ๐Ÿ˜… If you cannot spare the time I guess I will have to, but it would be very much appreciated if one of you guys were able to work this in. Regardless of the response: Thank you for taking the time! ๐Ÿค“

from color-mode.

markusressel avatar markusressel commented on July 28, 2024

Closing this due to lack of activity and outdated infos.
Thx for the conversation!

from color-mode.

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.