Design comparison
SolutionDesign
Solution retrospective
I appreciate any feedback. Not sure how to make the flag in the correct way. At beginning i thought that i will not be able to make it, but I thing that I did it quite well. In the other hand there are for sure a lot of things that could be done better.
Community feedback
- @PraneetDixitPosted over 3 years ago
Hi!
Some points for improvement -
- I guess the body background color in light mode is not correct.
- You are sending a separate network request for every filter change. A better approach can be fetching all countries once on the initial page load, storing the data in a variable and performing all the filter operations on the stored data.
- There are many ways to manage the country flag. If you want to keep using the flag as a background image, you can change the background styling as below :-
/*** CSS ***/ .image{ background-size: contain; /* So that you don't end up cutting the flag */ background-position: top; /* Keeping the flag on top */ background-repeat: no-repeat; /* Don't repeat the background */ }
- The icon and text in theme changer are misaligned.
/*** CSS ***/ .theme-toggle{ align-items: center; }
- Set
cursor: pointer
on clickable elements.
Some additional improvements (optional) -
- You can set pagination or infinite scrolling for long lists of countries.
- Allow users to directly visit country detail view by entering url in browser like
https://countries-search-api.netlify.app/detail/India
.
Happy Coding!
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