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

On.book - project library #51

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

Conversation

zoe-lindqvist
Copy link

@zoe-lindqvist zoe-lindqvist commented Sep 22, 2024

Netlify link

https://on-book.netlify.app/

Collaborators

  • [https://github.com/zoe-lindqvist]
  • [https://github.com/jacquelinekellyhunt]
  • [https://github.com/Fannyhenriques]

Added the right label to the right book
Copy link

@JennieDalgren JennieDalgren left a comment

Choose a reason for hiding this comment

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

Great job with this project!

You have worked well with both the UX and fucntinality of this project. Fun that you have implemented filtering, sort, and search functionality. Well done.

I see that you have mixed declaring functions with the keyword function and arrow functions. Make sure to stick to one approach to keep your code clean and tidy.
I will not approve your project based on this, just to emphasise the importance of clean code.

My preference would also be to gather all event listeners in one place, but this is up to you. You could also remove the filder with the images that you are not using in this project. And another minor thing, that we will learn more about bext week, make sure all your images have alt tags. You could add this to the objects. Not a need to change, more a nice to have for this time!

Keep up the good work!

Comment on lines +305 to +318
if (filteredBooks.length === 0) {
// Clear the book list and display a message while keeping the header
const bookList = document.getElementById("book-list");
bookList.innerHTML = `
<div style=
"display: flex;
justify-content: center;
align-items: center;
height: 300px;
width: 100%;
background-color: white;">
<p>No books with such search term</p>
</div>
`;

Choose a reason for hiding this comment

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

nice that you added an "empty state" ⭐

script.js Outdated
Comment on lines 293 to 297
// Function to filter books by title based on user input
function searchBooksByTitle(searchTerm) {
const filteredBooks = books.filter((book) =>
book.title.toLowerCase().includes(searchTerm.toLowerCase())
);

Choose a reason for hiding this comment

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

fun with a search field!

@jacquelinekellyhunt
Copy link

@JennieDalgren Thank you for this thorough feedback! I have changed the keyword function (for the search function) into an arrow function - thank you for pointing that out! Hope this clears the requirements! 😊

Copy link

@JennieDalgren JennieDalgren left a comment

Choose a reason for hiding this comment

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

⭐️

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.

4 participants