Skip to content

Conversation

@Konvaly
Copy link

@Konvaly Konvaly commented Dec 18, 2025

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

PR: Fix bugs and improve adding books

What was done:

  • Fixed errors that stopped books from showing on page load

  • Fixed issues when adding a new book

  • Corrected author and read status values

  • Fixed the delete button

  • Cleared the form after a book is added

  • Prevented adding the same book twice

Result: the app now works as expected and is easier to use when adding books.

@Konvaly Konvaly added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Dec 18, 2025
@Konvaly Konvaly changed the title Book library London | 25-ITP-Sep |Mariia Serhiienko | Sprint 2 | Book Library Project Dec 18, 2025
@jennethydyrova jennethydyrova added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Dec 18, 2025
Copy link

@jennethydyrova jennethydyrova left a comment

Choose a reason for hiding this comment

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

Very good work @Konvaly!

Comment on lines 28 to 31
const titleValue = title.value.trim();
const authorValue = author.value.trim();
const pagesValue = pages.value.trim();
const pagesNumber = Number(pagesValue);

Choose a reason for hiding this comment

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

You don't need to add "value" to every variable because they usually hold values. Also, L30 and 31 can be merged.

return;
}

let book = new Book(titleValue, authorValue, pagesNumber, check.checked);

Choose a reason for hiding this comment

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

Why is it declared with let?

authorCell.textContent = book.author;
pagesCell.textContent = book.pages;

const changeBut = document.createElement("button");

Choose a reason for hiding this comment

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

Nothing you need to change but better name would be changeBtn, this is just a convention

Copy link
Author

Choose a reason for hiding this comment

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

Fixed changeBut to changeBtn and delBut to delBtn

@jennethydyrova jennethydyrova added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Dec 18, 2025
@Konvaly
Copy link
Author

Konvaly commented Dec 19, 2025

Thank you for your time and consideration @jennethydyrova !

@Konvaly Konvaly added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Dec 19, 2025
@jennethydyrova jennethydyrova added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Dec 19, 2025
@jennethydyrova
Copy link

Looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants