Design comparison
Solution retrospective
The code is updated to fix a few bugs, shout out for @JoannaLapa for pointing them out β
- Fixed a bug where the advices weren't generated properly on Firefox.
- Fixed a bug where the page didn't display properly on smaller screen sizes
feature update 4/10/2022
- Updated the button to be disabled for 2 seconds after generating an advice <the api website says it can generate a new advice every 2 seconds> so if the user wants a new advice he may wait 2 seconds noticing the button is disabled better than just clicking on the button really fast not knowing why it wouldn't get a new advice instantly...
Community feedback
- @JoannaLapaPosted about 2 years ago
Hi Youssef Magdy!
My congrats on finishing the challenge! Your solution looks really good - it is responsive and you took care of all the design details included in the design file. The application works well besides the Firefox browser (I explain below). Your code is clean and short.
Some small details that you can improve: JS:
- When you open your site by Firefox browser there is a bug with taking advice from API - it takes only the advice at first and after doesn't refresh it. The problem doesn't exist on other browsers. Apparently, Firefox by default looks for a matching request in its HTTP cache. If there is a match and it is fresh, it will be returned from the cache - so it doesn't change the advice for a new one. You can read more in this article on mdn.
You can resolve it by adding {cache: no-cache} just after the URL address. I think this is a very interesting topic.
CSS:
- Very little detail to consider - you repeat 3 times the code: display: flex; align-items: center; justify-content: center; I think that this is a good way to add a class dedicated for flex like eg. "flex-center" and add it to HTML together with other classes.
- The responsiveness of your project is really good. The only suggestion that I have is when I look at iPhone 5 size there is no margin between the container and the edges of the screen.
I hope that my feedback was helpful, Happy coding! Joanna
Marked as helpful1@youssefmagdy21Posted about 2 years agoHey Joanna!
Thank you for your feedback, it's really appreciated π
Great tip about how Firefox handles the HTTP request, i actually didn't know this before, so thank you for pointing this out. I will check the article and make sure to fix this bug in my code.
For the CSS i actually was going to add a flex container class instead of repeating those lines of code, but apparently i forgot so thank you for pointing this out π also i really appreciate your feedback about how the page displays in iPhone 5, i will make sure to fix this bug for similar screen sizes.
Thank you for your tips and suggestions they are really appreciated πβ
0@youssefmagdy21Posted about 2 years agoHey @JoannaLapa
Thank you again for your feedback, the issues you pointed out should be fixed now
if you have any further suggestions they are very welcomed π
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