Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

time tracking dashboard main [using: json , mobile-first]

maym42 370

@maym42

Desktop design screenshot for the Time tracking dashboard coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hi, i would like to get feedback on my code 🧐‍💻

Community feedback

Amon 2,560

@A-amon

Posted

Hello! It's a very good job~ 😀

Here are a few tiny changes I would suggest:

  • Use <a> or <button> for the time buttons: Daily, weekly, monthly. (Those on the side) This will let screen reader users to know they are to be clicked. 😉
  • Maybe you forgot to set the current time button's color when the page first loads.
  • I noticed there are repetitive Js code. Maybe, you can create a single function that can replace the showWeekly, showMonthly, etc. For example:
function showCardContent(time, data){
 for (let i = 0; i < cardsTitles.length; i++) {
    currents[i].innerText = data[i].current + "hrs";
    prevs[i].innerText = `Last ${time}- ` + data[i].previous + "hrs";
  }
/*play the animation */
  addAnimationFadeIn();
}

The code above may or may not work but the general idea is there! 😁

Marked as helpful

0

maym42 370

@maym42

Posted

@A-amon Thank you so much for your feedback! It helped a lot 😀

0
Amon 2,560

@A-amon

Posted

@maym42 Glad to help~

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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