Skip to content

London | 26-ITP-May | Bisrat Tesfay | Sprint 2 | Book-Library - #536

Open
B3-Bisrat wants to merge 2 commits into
CodeYourFuture:mainfrom
B3-Bisrat:book-library
Open

London | 26-ITP-May | Bisrat Tesfay | Sprint 2 | Book-Library#536
B3-Bisrat wants to merge 2 commits into
CodeYourFuture:mainfrom
B3-Bisrat:book-library

Conversation

@B3-Bisrat

Copy link
Copy Markdown

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

Fixed the library bugs, including adding, displaying, reading status, and deleting books. Also fixed form validation and author input issues.

Questions

@B3-Bisrat B3-Bisrat added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 11, 2026

@cjyuan cjyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you also check if any of this general feedback can help you further improve your code?
https://github.com/CodeYourFuture/Module-Data-Flows/blob/general-review-feedback/debugging/book-library/feedback.md

Doing so can help me speed up the review process. Thanks.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

According to https://validator.w3.org/, there are errors in your index.html. Could you fix these errors?

Comment thread debugging/book-library/index.html Outdated
Comment on lines 49 to 55

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • Even though this element has a required attribute, the user could still "submit" the input the even if this input field is empty. Could you find out why and then address the issue?

  • For better user experience, you could also consider making this input field to accept only positive whole numbers.

Comment thread debugging/book-library/index.html Outdated
Comment on lines 57 to 62

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The checkbox is not showing.

The issue is related to Bootstrap 4.4.1. Could you use AI to find a way to fix the issue? Mentioning "Bootstrap 4.4.1" might help.

Comment thread debugging/book-library/script.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we declare myLibrary in a way that prevents it from being accidentally reassigned?

Comment thread debugging/book-library/index.html Outdated
value="Submit"
class="btn btn-primary"
onclick="submit();"
onclick="addBook()"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you research the trade-off between

  1. Attaching event listener in HTML
  2. Attaching event listener using addEventListener() in JS

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 12, 2026
@B3-Bisrat B3-Bisrat added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 12, 2026
@B3-Bisrat

Copy link
Copy Markdown
Author

Thank you for the feedback and comments. I’ve made the suggested changes based on your feedback. Could you please have a look and let me know if there’s anything else I should improve?

@B3-Bisrat B3-Bisrat removed the Reviewed Volunteer to add when completing a review with trainee action still to take. label Aug 12, 2026

@cjyuan cjyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes look great. Well done.

required
/>
<label class="form-check-label">
<form id="bookForm">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could use lower kebab case for a naming consistency.

myLibrary.splice(i, 1);
render();

alert(`You've deleted title: ${deletedTitle}`);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

alert() is a blocking function call. As a result, invoking it prevents the browser from updating the UI until the dialog is dismissed.

If time permits, research for approaches that allows the UI to update before displaying the alert dialog. (This is an optional change).

const checkInput = document.getElementById("check");
const bookForm = document.getElementById("bookForm");

bookForm.addEventListener("submit", addBook);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could consider placing all code that runs once on page load in a single function. For example, you could put it inside the page load callback or create a function named init() or setup() and call it once when the page loads.

This makes it easier to locate and manage all the code that runs once when the app starts.

@cjyuan cjyuan 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 Aug 13, 2026
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