Could I improve the layout of the cards without relying on :nth-child
? Also, did I use @mixin
effectively and could other @mixins
also be applied elsewhere? Any other feedback on the page is appreciated. Thanks!
Anubliss
@Anubliss-0All comments
- @cucumerisGITSubmitted 2 months agoWhat specific areas of your project would you like help with?@Anubliss-0Posted 2 months ago
Hey there, great job on the challenge! And well done expanding your knowledge to explore using sass mixins.
I took a look at your structure and I had a couple notes on what could potentially be improved in the future...
In terms of semantics You have used header for the top half of the page and main for the bottom half. Personally this entire document could be in a main tag, the content in the header is too important for the context of the page to be in a header. It can be a matter of preference, but I would put them both in sections. However, the fact you are using semantic html is great! Really important to consider.
You asked for tips on styling, especially using sass for styles. The use of mixins and variables is good! Especially since the card is getting reused. If you want to continue using these tools for future projects one of things I like to use mixins for are utility styles for commonly used styles or media queries.
For example...
@mixin flex-column-center { display: flex; flex-direction: column; justify-content: center; align-items: center; }
Then call it in another style
.some-class { @include flex-column-center; border: 1px solid green; }
This is a good place to start when using mixins, but sass is actually far more powerful and later down the line you can start giving arguments to mixins like you would a JS function
@mixin flex-center($direction: row, $justify: center, $align: center) { display: flex; flex-direction: $direction; justify-content: $justify; align-items: $align; }
But dont worry about this for now :)
And lastly, since I noticed it as I was finishing up. on my display the cards are almost aligned with one another. It looks like you may have used rem to set the size of the container/page. This is generally good practice, however if no base font size for rem specifically set in your styles then the layout will look strange on different machines/browsers due to the base font size set by them rather than specified by you, the developer.
All in all a great finished project, and the desire to expand your knowledge to something new (sass) is commendable! Well done
Marked as helpful0 - @codercreativeSubmitted 2 months agoWhat are you most proud of, and what would you do differently next time?
Overall, I’m pleased with how the project turned out, though there’s always room for improvement.
I’m particularly happy with the UI/UX refactoring I implemented, which enhanced both the flow and usability of the app while remaining true to its original concept.
As I continue to deepen my understanding of JavaScript, my goal is to make the code even more readable and DRY (Don’t Repeat Yourself).
I’m also excited to explore motion design techniques in the future, which could make the custom tip input field a more engaging user experience.
What challenges did you encounter, and how did you overcome them?Balancing simplicity and readability with functionality in my JavaScript logic.
What specific areas of your project would you like help with?I am grateful for any helpful tips! 🙏
@Anubliss-0Posted 2 months agoFantastic job finishing the project, it looks great! I took a look at your code and its very well organized and clear to read.
There really isn't much for me to say in terms of suggested improvements, but if I may offer some feedback I would look into the use of aria-labels and further semantics for a11y friendly design.
The aria-label you have is a great touch, however good practice for labels is to try and make them as concise as possible seeing as screen readers will read every single label. A good example that could help here is to describe the what the input is and whats its purpose is, rather than what the user does with it. For example...
aria-label="Custom tip percentage"
As for adding further a11y friendly touches to your project you could consider...
- Adding "roles" to your buttons to ensure the semantic meaning is clear
<button class="tip-btn" data-percent="0.10" aria-label="10 percent tip">10%</button>
-
Using
<fieldset>
to group related inputs together. -
The invalid input warnings are currently set to
aria-hidden
These should be visible to screen readers and with the use of aria-live can actually provide important information to users who rely on a11y tools to access the web.
Instead of hiding them, consider using aria-live, the message is empty by default and updated with JS, so when that change happens aria-live will inform the user that the error has occurred.
<span class="bill-error-msg" id="bill-error-msg" aria-live="assertive" ></span>
Please feel free to reach out if you have any questions regarding a11y! Otherwise congratulations on completing the challenge.
Marked as helpful1 - @Anubliss-0Submitted 2 months agoWhat are you most proud of, and what would you do differently next time?
What I'm Most Proud Of
- Switching to TypeScript: Transitioning from JavaScript to TypeScript gave me more confidence in handling types and improved the overall code quality.
- React Routing: Implementing React Router to create a dynamic, single-page application was a rewarding challenge that improved my understanding of SPAs.
- i18n Integration: I'm proud of implementing i18n for multi-language support, including translations for aria labels to enhance accessibility.
- Design Changes:
- Adding a cancellation countdown timer to the "place order" button, improving user experience.
- Making the cart more mobile-friendly by adjusting its placement rather than leaving it at the bottom of the document.
- Expanding the project to multiple pages and making it work seamlessly with React routing.
What I'd Do Differently
- Testing: Next time, I plan to focus on adding unit and end-to-end testing to catch bugs earlier and prevent issues from arising as the project evolves.
- ESLint: I would like to use ESLint more effectively to ensure cleaner, more consistent code.
- Project Scope: I realized that adding too many features caused the project to grow larger and more complex than originally intended. While it was a great learning experience, it significantly extended the project timeline. In the future, I’ll focus on better planning and scoping the project to avoid this.
-
Switching from CRA to Vite: Transitioning to Vite brought some challenges, especially with how SVGs are imported and styled differently compared to Create React App. After some troubleshooting, I learned how to properly handle SVGs and style them as needed.
-
Learning TypeScript: Initially, adapting to TypeScript was tricky, particularly when passing down props in React Router. However, with practice, I became more comfortable with TypeScript and its benefits. I plan to continue improving by practicing basic TypeScript outside of React to strengthen my skills further.
-
React Router & TypeScript Integration: Understanding how to integrate React Router with TypeScript was another hurdle, especially when it came to passing props. After experimenting, reading the documentation, and turning to Stack Overflow for help, I was able to work through these issues successfully.
I’m concerned that I may have overengineered certain aspects of this application. Additionally, some late changes to the layout impacted existing styles and prop passing. Any feedback on how the project could be streamlined or simplified would be greatly appreciated!
@Anubliss-0Posted 2 months agoCouple points to anyone who takes a look at this submission...
There are a lot of warnings about img's without an alt. I had some trouble with importing SVG files in this project, the issue was related to Vite and when I used iconify i was unable to alter the colour using scss due to the way iconify imports icons to react. I have since added aria-hidden="true" to these and will look into a better way to use icons moving forwards. The warnings however still appear in Frontend Mentor.
The preview looks different! Since I used React-Routing for this project I used picsum placeholder images, While I would be nice to have "real" images of food for this project I was more interested in developing my skills rather than finding food photos.
Additionally, I see the in the preview example that the border radius is higher than what is given in the included figma file. I am going to stick with what I have as I feel it is nicer than the really round edges.
0 - @Anubliss-0Submitted 3 months agoWhat are you most proud of, and what would you do differently next time?
I am really happy with how I DRY'ed up some code by making the number input more modular by adding render options. I also tried my hardest to ensure the page was as a11y friendly as possible. Additionally I also added a language select option! This page is available in English, Dutch, French, Spanish and German!
I am also happy with the way I organized my code using a feature based component structure.
What challenges did you encounter, and how did you overcome them?This was my first React project, and as time went on I found that I had to re-organize things, specifically lifting states and variables up so they could be accessed elsewhere. I also could have organsied myself a little better. I started by trying to tackle html, styles and logic together but in hindsight should have planned more then tacked them Logic -> Structure(and a11y) -> styles.
What specific areas of your project would you like help with?I would like to know how I could be utilizing React more efficiently! Also It has been a while since I worked front-end and feel my a11y practices might be a little rusty and could possibly be improved.
Also I have been using jQuery for sometime now and am working on improving my vanilla JS where possible.
@Anubliss-0Posted 3 months agoNEW NOTE Check the date on your medium articles folks, CRA is way out of date. Use Vite instead
0 - @AlejandroIMPSubmitted 3 months agoWhat are you most proud of, and what would you do differently next time?
I am proud of how I have been able to make the responsive design very similar to what has been shown to me in the screenshots with my knowledge and research in the documentation, I have made several mistakes and I have wasted time on the same problem for a long time, I have missed things that at the beginning of the web I did not think about in the future, which I will change next time.
What challenges did you encounter, and how did you overcome them?I have had problems organizing the inputs where numbers are entered, and I have solved it by researching the official HTML and CSS documentation. I have also had problems manipulating the DOM, with problems that I had not the slightest idea of how to create the solution from scratch, researching on the internet, on the StackOverflow website I was able to find many solutions that were useful to me, and I have been able to apply these solutions to my problem.
What specific areas of your project would you like help with?In the use of scss I think I have been able to use it in a better way, I would like to know what bad practices I have done in the organization with scss. Also in javascript, I have used pure javascript to practice it, however, I think my solution can be more efficient and shorter.
@Anubliss-0Posted 3 months agoHello, and congrats on finishing this challenge! I have taken a little look at your comments, code and the page itself and have a few tips and feedback to offer 😄
You mention about organizing your SCSS. It seems you already have a good understanding on some of the great features SCSS has to offer, the use of a @mixin for the desktop media query is a nice touch which really helps with cleaning up the code. The use of variables for colours is also good practice for front end development.
A couple of things I will point out in terms of SCSS...
-
Usually it is considered best practice to only nest styles three layers deep when writing SCSS as it can get quite hard to read. To target specific elements you could utilize a mix of SCSS nesting and CSS combinators/selectors.
-
It seems you have access to the figma design file based on your variable naming system. As such I find it is helpful to create typography mixins to use throughout my projects based on the typography styles provided in the design file! This will also help with ensuring the correct font sizes are used in your project.
Your use of Pure JS is undoubtedly good practice, I however would consider looking into some modern JS coding provided by ES6! You have already used consts which is part of that but there is so much more to offer.
In terms of a11y, there is some work that could be done here, but that's a whole chapter of the book on its own. I strongly recommend looking into it I would implement it as part of your next project rather than go back and try to add it to this.
One last thing, I see on your GH that you want to learn React. Its a good idea and a great framework for creating web applications. As you continue down this learning path I would suggest looking into modular styles as it can really help with organizing style rules.
But again, great job! Sorry for the wall of text, please take these as suggestions rather than must-haves and most of all enjoy your future projects!
Please feel free to reach out if you have any questions!
Marked as helpful0 -
- @Anubliss-0Submitted 3 months agoWhat are you most proud of, and what would you do differently next time?
I am really happy with how I DRY'ed up some code by making the number input more modular by adding render options. I also tried my hardest to ensure the page was as a11y friendly as possible. Additionally I also added a language select option! This page is available in English, Dutch, French, Spanish and German!
I am also happy with the way I organized my code using a feature based component structure.
What challenges did you encounter, and how did you overcome them?This was my first React project, and as time went on I found that I had to re-organize things, specifically lifting states and variables up so they could be accessed elsewhere. I also could have organsied myself a little better. I started by trying to tackle html, styles and logic together but in hindsight should have planned more then tacked them Logic -> Structure(and a11y) -> styles.
What specific areas of your project would you like help with?I would like to know how I could be utilizing React more efficiently! Also It has been a while since I worked front-end and feel my a11y practices might be a little rusty and could possibly be improved.
Also I have been using jQuery for sometime now and am working on improving my vanilla JS where possible.
@Anubliss-0Posted 3 months agoSo I see that I am getting a warning about ...
<html lang="en">
I'm a little confused because I actually have this as a heading already in my index.html so this warning seems a bit off. However this does actually raise another question! Since I am using i18next-react in my project my current language is accessed via
i18n.language
From within my JSX components this requires importing and accessing the necessary JS, but in index.html an import isn't possible as far as I know...
What could be the solution here? I don't imagine changing index.html into JSX is correct or advisable and I feel things like head and meta should remain in here rather than moving down into app.js for example.
Would love to hear what the community thinks!
Thanks in advance!
0 - @dcx2024Submitted 4 months agoWhat challenges did you encounter, and how did you overcome them?
getting the layout to be arranged
@Anubliss-0Posted 4 months agoNice job on this challenge! I had a couple of pointers from a quick glance at your code... For starters I see you have used vh to set the height of your cards, while vh can be very useful it can result in strange box sizing on larger screens, I would avoid it for sizing elements in most cases.
If you want to dynamically size an element I suggest the use of flexbox instead, I can see you have used it in your layout already so great start!
And in response to your comment... "getting the layout to be arranged"
The way you have structured your html with one card in the first section, two in the second and three in the third is good, the use of media queries is good as well.
I do notice however you have forgotten to close the last image tag! <img src="/icon-calculator.svg" alt="calculator>
Nice job, feel free to message me if you have any questions.
Marked as helpful0 - @Hyuuga81Submitted almost 3 years ago
I used a background image and linear gradient to get the color to change on mouseover. Any alternative solutions out there? Please let me know, would love to see your code. Thanks.
@Anubliss-0Posted almost 3 years agoHi Jay,
To get the container to turn blue on hover, I wrapped the image in a container and set the background color to blue
background: #00fff8;
Then I targeted the image inside the container itself with the following...
mix-blend-mode: normal; opacity: 0.5; border-radius: 8px; transition: linear 0.25s; }
The transition isn't necessary, but it looks cool so I used it!
Great job completing this challenge!
Marked as helpful0 - @SumitK27Submitted almost 3 years ago@Anubliss-0Posted almost 3 years ago
Looks pretty good! If I may suggest something, the page would really pop if you used a hover effect on the image to make it glow blue when the mouse is over it.
img:hover
will allow you to do this https://developer.mozilla.org/en-US/docs/Web/CSS/:hoverWell done on completing the challenge!
Anubliss-
Marked as helpful0 - @zubershkSubmitted almost 3 years ago@Anubliss-0Posted almost 3 years ago
Great job on completing this challenge!
The site does a good job of meeting the design brief, I especially like the transition on the NFT review image on
:hover
If I may suggest something, Perhaps you could center the card by targeting the first
.container
div and setting a margin?I also noticed the image does not have rounded corners, easily missed but an easy fix using
border-radius: 8px;
Otherwise its great job! I also noticed the use of utility classes and color variables which is something I'm only just starting to use myself, nicely done :)
Anubliss_
0 - @Prajwol-ShresthaSubmitted almost 3 years ago
Hey, I am a beginner at this field. So, can you provide some areas that i should focus on. Also, can you rate my code.
@Anubliss-0Posted almost 3 years agoHey Prajwol, congratulations on completing the challenge!
Vanza Setia has already given some incredible feedback on your project! There's really not a lot I can add but I can give you some useful links.
Wave web accessibility evaluation tool - https://wave.webaim.org/
W3 markup checker - https://validator.w3.org/
It's easy to make errors as a developer, so I use these to spot any issue I may have missed.
Again, great job on the challenge and good luck!
Marked as helpful1 - @ryuuwizSubmitted almost 3 years ago@Anubliss-0Posted almost 3 years ago
Site looks cool!
Like Alucard said, hover effects would really make the page pop. You might know how to use them, but here's some info on Psuedo classes that could be helpful. https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes#user_action_pseudo-classes
Otherwise it seems that the accessibility issues could be solved with the addition of at least one <main> element.
I got the same issue, but I fixed it by changing the div containing the cards content to the more semantic <main> element.
Great job completing this project!
Marked as helpful1