Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 2 years ago

Interactive Comments Section [vanilla JS]

Jo Young•840
@Jo-cloud85
A solution to the Interactive comments section challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


This challenge was completed with:

  • dark and light theme toggle
  • the ability to switch users that also comes with a tiny bit of animation
  • pop-up alerts when users try to send an empty response or vote more than once
  • sync data with localStorage for any CRUD operations

Due to this challenge's multiple state management requirements, I used a lot of function declarations, instead of function expressions, which I understand is not ideal. Also, there still might be some bugs lying around. Nevertheless, I had fun drilling my Javascript skills.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • P
    visualdennis•8,395
    @visualdenniss
    Posted almost 2 years ago

    Hey Jo,

    great work! This one is a quite tricky challenge and u have did an amazing job :)

    There seems to be little issue with the vote system. Once u vote, if u can only cancel that vote but u cannot vote the opposite way. E.g. if u upvote, it goes up to 5, but if u downvote it never goes to 3, which should be the case. I've listed here Vote System States. Also i dont think it is necessary to put an explicit warning to a user. The standard practice on web is to toggle when clicked twice, instead of a pop up alert.

    Its also very nice that u added little menu to switch users. I've also initially wanted to make a menu like u and display users with animation onClick, then i thought since this is a demo, people might not spend time much, so i wanted to make it very explicit. But if it was a real-world thing, i'd hide them into a menu too.

    Hope you find this feedback helpful! Keep up the great work ;)

    Marked as helpful
  • Andrei•560
    @Xeotheosis
    Posted almost 2 years ago

    Fantastic work

  • NizarMjr•390
    @NizarMjr
    Posted almost 2 years ago

    You have made a nice work , i like what you have done but there are some updates could make your project more efficient : try to make the alert notification disappear after an interval of time as well as only one notification appear on the top of screen and delete reply does not work

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub