Skip to content

JS RECIPE CODE #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

phenomenalCode
Copy link

No description provided.

<button type="button" class="filter" id="usa-btn">American</button>
<button type="button" class="filter" id="asia-btn">Asian</button>
<button type="button" class="filter" id="china-btn">Chinese</button>
<button type="button" class="filter" id="vegetarian-btn">Vegetarian</button>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Vegetarian" is supposed to be included in diet and not cuisines?

<h1>Recipe Library</h1>
<section class="filters">
<div>
<h2>Filter cousines</h2>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just commenting the typo, should be "Filter cuisines".

</div>
<div>
<h2>Sort on by</h2>
<button class="sort" id="hightolowbtn">Cooking time</button>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe change to "high-to-low-btn" or "highlow-btn" for better readability.

<button type="button" class="filter" id="vegetarian-btn">Vegetarian</button>
</div>
<div>
<h2>Sort on by</h2>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just simple change in typo, change "Sort on by" to "Sort by". Nothing major!

}

/* Special Button Styles */
.popular-btn {
Copy link

@T-Thiry T-Thiry Mar 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are using the class .popular-btn , but you have used an id though in your HTML file.

@T-Thiry
Copy link

T-Thiry commented Mar 23, 2025

Don't forget to add a link to your deployed website as mentioned in a separate forum.

Copy link

@T-Thiry T-Thiry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work putting this together! I would say this code is well-organized and I like the way you have structured your implemented features such as filtering, sorting, and fetched data. There are a few areas where consistency could be improved for better readability, but nothing major. I would have loved to see the final result on a website and play around a little bit. Only then do I think I would have had something else to add to this code review. Keep up the good work!

@HIPPIEKICK
Copy link
Contributor

Can you share a link to your deployed page as well please 😇

@phenomenalCode
Copy link
Author

phenomenalCode commented Mar 26, 2025 via email

@HIPPIEKICK
Copy link
Contributor

Please share a link to Netlify here on GitHub so that I can review your handin.

@phenomenalCode
Copy link
Author

phenomenalCode commented Mar 28, 2025 via email

Copy link
Contributor

@HIPPIEKICK HIPPIEKICK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your app is not working. Please make sure it works and request a re-review when you're happy with it.

@phenomenalCode
Copy link
Author

phenomenalCode commented Apr 18, 2025 via email

Copy link
Contributor

@HIPPIEKICK HIPPIEKICK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you’re only fetching 4 recipes, it’s hard to try out your filters. Maybe fetch some more recipes? All your sorting options don’t work, so check that out too.

You’ve given your functions descriptive names - good! Please clean up your code however, get rid of console.logs() and be consistent in whether you use arrow functions or the function keyword. And should really all those functions run on page load?

Missing requirements:

  • Users should be able to select at least one filter, and at least one sorting option
  • Your page should show a useful message to the user in case the daily API quota has been reached
  • The user should be able to click a button that selects a random recipe, and your page should display the selected item
  • Your page should have an empty state, e.g. if there are no recipes matching the filter - show a meaningful message to the user

Do another take on this and request a re-review when you're ready. Almost there 💪

@HIPPIEKICK
Copy link
Contributor

Ping! 🔔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants