Skip to content
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

First PR for this project #17

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open

First PR for this project #17

wants to merge 25 commits into from

Conversation

govargas
Copy link

Hi Christina! This PR implements the Recipe Library I did for this assignment. The project dynamically fetches recipe data from Spoonacular’s /recipes/random endpoint and displays recipe cards with filtering, sorting, random selection, infinite scrolling, and caching.

I implemented—I think—all of the requirements and some stretch goals; I describe these and more in detail in the README file.

If it looks like a lot of code, well, I’m still working to understand everything I did!
I also wish I implemented the search function, but that would have been too much for my brain to grasp right now. Maybe later in the week.

Choose a reason for hiding this comment

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

Super cool that you created your own dropdown! And html looks neat and makes sense.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you!

*, *::before, *::after {
box-sizing: border-box;
}

Choose a reason for hiding this comment

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

I'm curious why you used *::before and *::after? (no feedback just genuinely interested)

Copy link
Author

@govargas govargas Mar 18, 2025

Choose a reason for hiding this comment

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

It comes from CSS I used in the previous business project. The design looked off without it, and I learned it was good practice for potential pseudo-elements, so I kept it. Removing it in this project distorts the recipe card’s alignment, placement, and borders on both mobile and desktop. Seems like a quick fix tho, so I am eager to learn alternative methods to address these issues.

.menu-icon.open span:nth-child(3) {
transform: translateY(-9px) rotate(45deg);
}

Choose a reason for hiding this comment

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

This is a really cool implementation of the nav hamburger menu!

Copy link
Author

Choose a reason for hiding this comment

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

Glad you like it. I took Technigo's nav hamburger icon as inspiration and used on the first project, the business site. Then used that as a template for this one :)

Choose a reason for hiding this comment

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

Some cool CSS and the file looks organised and I found it easy to read :)

Choose a reason for hiding this comment

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

So I think that not everything needs to be inside the document.addEventListener("DOMContentLoaded") function. It might be a bit more readable if you find a way to break some functions out of there and use DOMContentLoaded when its needed. Unless there is a specific reason that I'm missing.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks. I will definitely look into that!


// --- Loading State ---
recipesContainer.innerHTML = "<p>Loading recipes...</p>";

Choose a reason for hiding this comment

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

This is an interesting way of doing this, adding this before the recipes are fetched, its a cool and simple solution in my opinion!

Copy link
Author

Choose a reason for hiding this comment

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

Thank you!

Copy link

@christina-baldwin christina-baldwin left a comment

Choose a reason for hiding this comment

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

I've added a few comments within the code with more specifics. I think this is well made and organised and all the requirements and stretch goals are implemented so great job!

@govargas
Copy link
Author

Thanks for your thoughtful comments and feedback, Christina!

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.

2 participants