Skip to content

Cape Town | 2026-ITP-Jan | Isaac Abodunrin | Sprint 2 | Data Flows: Book Library Project#424

Closed
bytesandroses wants to merge 22 commits into
CodeYourFuture:mainfrom
bytesandroses:feature/book-library
Closed

Cape Town | 2026-ITP-Jan | Isaac Abodunrin | Sprint 2 | Data Flows: Book Library Project#424
bytesandroses wants to merge 22 commits into
CodeYourFuture:mainfrom
bytesandroses:feature/book-library

Conversation

@bytesandroses

Copy link
Copy Markdown
Member

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 bugs and syntax errors in the script.js file, ensuring:

  1. Books are displayed when page loads
  2. New books are added correctly
  3. Author name is correctly saved
  4. Deletion now removes books
  5. 'Read' option correctly processed

@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.

  1. If your PR is ready to be reviewed, you need to add a "Needs Review" label.

  2. Regardless, please 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.

@bytesandroses

Copy link
Copy Markdown
Member Author

Hi @cjyuan sorry I forgot to add the needs feed back label.

I've gone ahead .and refactored the script meet the criteria described on the feedback link

@bytesandroses bytesandroses added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 20, 2026
@bytesandroses bytesandroses added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Apr 20, 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.

Code looks good. Well done.

Comment on lines +21 to +24
const titleInput = document.getElementById("title");
const authorInput = document.getElementById("author");
const pagesInput = document.getElementById("pages");
const checkInput = document.getElementById("check");

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.

Common practice is to declare all shared variables/constants at the beginning of the file before function definition.

submitForm.reset();

render();
});

@cjyuan cjyuan Apr 20, 2026

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 keeping all the "run on page load" code in one place (in the call back of window's onload event listener) as:

const submitForm = document.getElementById("bookForm"); // declare at the top
...

// function definition
function submit(e) {
  ...
}

window.addEventListener('load', () => {
  submitForm.addEventListener("submit", submit);
  populateStorage();
  render();
});

@cjyuan cjyuan removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 20, 2026
@cjyuan cjyuan added the Complete Volunteer to add when work is complete and all review comments have been addressed. label Apr 20, 2026
@illicitonion

Copy link
Copy Markdown
Member

Closing PR because the January ITP run has finished. Feel free to re-open if you're still working on it.

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.

3 participants