Design comparison
Solution retrospective
feel free to give me your feedback
Community feedback
- @javascriptor1Posted over 1 year ago
Hi LOUBNA,
Nice work. For the submit button, you should check first if the user selected a rating or not before you submit. Right now, If no rating is chosen, the button will submit a null value which should not happen.
Also, apply some margin between the 5 rating choices and the text on top of it.
In addition, you need to fix the active state. Give it another look.
You also should use HTML semantic tags like main for the content and footer for the footer note and alt text for the images in your design.
Hope this help.
Keep coding 🚀
1@LoubnakbPosted over 1 year agoHi @javascriptor1
Thank you so much for your comment, do yoou have an idea how to prevent the no rating thing please ?
0@javascriptor1Posted over 1 year agoHi Loubna@Loubnakb ,
The logic is very simple. You have to add a check condition before you submit. Unfortunately, I don't know to work with React yet.
However, in Vanilla JS, you can add an event listener on the button and check the value of the input rating. If the value is null, you can display a message or an alert to the user. Otherwise, the button will submit.
I hope this help out. MKF
0
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