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 that pulls from JSON data

Luke 140

@lukeSchwade

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


What are you most proud of, and what would you do differently next time?

I'm proud of the way I figured out the CSS for the cards (using a grid display and setting negative margins so they'd sit on top of each other)

I also think the way I set up each card as a separate object that interfaced with the user data in an iterative loop was a clean solution to updating the same types of info 6 times per button press, as well as the methods within each object that handle plural hours and the past tense

What challenges did you encounter, and how did you overcome them?

I wanted to set up a fake server fetch with asynchronous functions but I was really struggling with promises, until I better understood that each .then() is a separate promise instance that needs to be resolved, and when they're chained together they pass a value to the next .then() I also didn't realize that you can't directly interface with async patterns, ie, I initially had userData = fetchJSONDataAsync(); which did not work, because it wouldn't return the data it would return a promise object (which did include the data)

I solved this by declaring UserData as a global variable, then populating it with data within the logic of the async function

Community feedback

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