INTERACTIVE RATING COMPONENT WITH CARD 3D FLIP | HTML CSS JAVASCRIPT
Design comparison
Solution retrospective
I really appreciate any feedback to make my code better 😁
Happy Coding ☕
Community feedback
- @festsnusaPosted almost 2 years ago
Congratulations for completing this challenge!
I liked that you used BEM correctly. Also, I liked that you added transitions instead of transferring to another page.
Here are some advices to how to improve your code:
- I'm not a big fan of putting the same elements more than 3 times in a row in HTML. Case in point, your inputs. You are able to rewrite it to loop in JS or loop it using Pug;
- Also, it strange that after submitting a score, the card turns back to initial state;
- your handleSubmit() function is empty;
- I don't like that you have to get label.active via querySelector every time in a loop. You can just check the class .active using classList.contains() method.
Hope you found my feedback useful. Happy coding!
Marked as helpful0@msuryaditriputraRPosted almost 2 years ago@festsnusa Thanks for your Feedback dude.
I have updated my code according to the advice you gave except on point no 2, Yeah, it's weird in the actual case, but for fake cases like this, I made the card flip back again to the initial state so it's not too boring hehe 😁
Now my code looks better than before after avoiding overwriting as you suggested. Thanks a lot 🙌
keep sharing your knowledge and experience 🔥 and Happy Coding ☕
1
Please log in to post a comment
Log in with GitHubJoin 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