Coder Social home page Coder Social logo

Comments (4)

andreasvirkus avatar andreasvirkus commented on August 26, 2024 1

🙋‍♂ I'd like to tackle this

from readder.

sleepyfran avatar sleepyfran commented on August 26, 2024 1

@andreasvirkus yeah, I remember having the same issues back when I installed the dependencies for the first time, even in Mojave. I don't remember what I did to solve them finally but right now I have node v10.16.3, so that might be the answer hahaha

As of the code it's looking great so far! I'd definitely advice to either call the CHANGE_THEME mutation directly or adding an optional parameter to the current SWITCH_THEME since this will come in handy if we finally decide to implement some kind of persistence; talking of which, I briefly mentioned it in #16, so it's definitely up to you, if you prefer you can work on this feature on its own and then add some persistence in another branch that we can reuse to start implementing the settings or do it all in this PR and we can continue from here once we decide to start working on the settings. The same for localStorage or a cookie! 😋

Thanks for the great work!

from readder.

sleepyfran avatar sleepyfran commented on August 26, 2024

🙋‍♂ I'd like to tackle this

@andreasvirkus great to hear! If you have any doubts or want to discuss any technical detail feel free to mention it here 😃

Sent with GitHawk

from readder.

andreasvirkus avatar andreasvirkus commented on August 26, 2024

I had a hard time getting the dependencies to install locally (on MacOS Catalina) because of some infamous node-gyp errors 😞 (with Node v12.11.1)... I might just have to downgrade my Node verson to 8.* something, as some issues under the node-gyp library suggest :/

I started working on the code nonetheless - That's what I've added so far - https://github.com/andreasvirkus/readder/blob/feature/theme-preferences/src/view/App.vue#L33-L60
(I'll most likely also add a state param to the switchTheme action instead of creating separate actions per theme? So if no param is passed in, it'll act as a toggle (current functionality))

We can use window.matchMedia to initially check for the preference as well as add a listener so it's reactive to any changes that happen while the user is on the site!

Btw, I saw that the theme choice is not persisted atm between site visits - would it be OK to save it in localStorage (or a cookie, up to you) for example? If yes, can I do it within this same issue or would you like it to be a separate PR?

from readder.

Related Issues (17)

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.