Design comparison
Solution retrospective
Hello everybody, this is my second time doing this project after a long time. Refactored it well. Still not sure about my input validation. Any suggestions are welcome.
Community feedback
- @elaineleungPosted about 2 years ago
Hi Vasyl, first off, well done working on this a second time; I think things look pretty good here mostly, and the calculator is fairly functional! 😊
One thing you can consider reworking is to allow the user to input their values in any order and still get the amount calculated. What I mean is, if I click on a button first and then try to input the people and bill amounts, I won't get the values calculated; I needed to input the numbers first and then click on the tip. It also won't work if I input the bill, click on a tip, and then type in the number of people. Needing to follow a specific order may not be the best for user experience, as you'd want to give the user the freedom to choose their own order instead of restricting them.
Another comment is that when I click on the button, the selected style is shown when clicked, but if I click something else, that selected style is lost, and it would look like I didn't choose a tip. The reason is you're using the
focus
style, which is not meant to be used this way as an indication of selection. The focus style is meant to show which element has the current focus and is being interacted with. Instead of the focus style, try using a class instead that you can add/remove/toggle, or better yet, have this buttons as radio inputs, and that way, you can use thechecked
attribute to do styling in the CSS.That's all I have for comments; hope this helps a bit, and more importantly, keep going! 😊
Marked as helpful0@vasyaqwePosted about 2 years ago@elaineleung Hi Elaine, hope you're having a great day. Thank you so much for pointing these things out. I'll definitely try to find my way around them :)
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