Design comparison
Solution retrospective
Hey there!!
So, thats probably the most challenging project so far, cause I had to deal with exceptions (mainly because the app doesn't have a submit button, so the results have to update automatically every time a key pressed) and I used almost all of the knowledge I've been learning, which includes: javascript DOM manipulation, functions, parameters and preventing negative inputs, etc; CSS flexbox, as always, which is becoming usual, but in this case I had to deal with grid too, style inputs (text and radio borders, pseudo elements, disabled states, etc), which was fun and responsiveness.
The behavior I wanted to put in my app is:
- When the user start to type the bill value, the "cant be zero" message shows on the number of people input field, but the focus stays on the bill input;
- When the user chooses a tip on the tip radio buttons (or put a custom value), the message stays, but the focus goes automatically to the number of people field;
- All the results are updated automatically when any of the inputs changes;
- The user can't type any negative value in the input fields;
- The account value input can accept values with two decimal places, while the people input only accepts integers
- Results are only updated if all conditions are met;
- I tried to make the design as accurate as possible.
Things to improve soon:
- Limit the maximum bill value the user can type (I'll do this right now);
Feedbacks are welcome :)
Community feedback
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