Skip to content

London | 26-ITP-Jan | Said Fayaz Sadat | Sprint 2 | Book Library#438

Open
fayaz551 wants to merge 4 commits intoCodeYourFuture:mainfrom
fayaz551:book-library
Open

London | 26-ITP-Jan | Said Fayaz Sadat | Sprint 2 | Book Library#438
fayaz551 wants to merge 4 commits intoCodeYourFuture:mainfrom
fayaz551:book-library

Conversation

@fayaz551
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 bugs and implemented the fixes

Questions

n/a

- Corrected variable reference from 'library' to 'myLibrary'.
- Fixed logic bug where title input was being used for the author field.
- Fixed delete button functionality and event listener naming.
- Corrected read status display logic to show "Yes" when checked.
- Changed input types for title and author to 'text' for standard validation.
- Ensured script and bootstrap links are correctly ordered for DOM loading.
- Adjusted form-group dimensions for better visibility.
- Added spacing and alignment for table action buttons.
@github-actions

This comment has been minimized.

@fayaz551 fayaz551 changed the title LONDON | JAN - 2026 | Said Fayaz Sadat | Book library LONDON-JAN-2026 | Said Fayaz Sadat | Sprint-3 | Data flows Apr 15, 2026
@github-actions

This comment has been minimized.

@cjyuan
Copy link
Copy Markdown
Contributor

cjyuan commented Apr 17, 2026

Your PR title is in the wrong format. That's why the validation bot could not recognise it.

@fayaz551 fayaz551 changed the title LONDON-JAN-2026 | Said Fayaz Sadat | Sprint-3 | Data flows LONDON-JAN-2026 | Said Fayaz Sadat | Sprint 3 | Book Library Apr 17, 2026
@github-actions

This comment has been minimized.

@fayaz551 fayaz551 changed the title LONDON-JAN-2026 | Said Fayaz Sadat | Sprint 3 | Book Library London | 26-ITP-Jan | Said Fayaz Sadat | Sprint 2 | Book Library Apr 17, 2026
@fayaz551
Copy link
Copy Markdown
Author

Your PR title is in the wrong format. That's why the validation bot could not recognise it.

Changed the title to correct format, validation passed now.

Copy link
Copy Markdown
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

You have fixed the explicit bugs, but the code still have some rooms to improve.

Can you 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.

Comment thread debugging/book-library/script.js Outdated
myLibrary.push(book1);
myLibrary.push(book2);
render();
// render() is called in the window load listener, so no need to call it here twice
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.

You can delete any unnecessary code.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Removed redundant render() call in populateStorage to follow DRY principles.
Refactored render() to clear table body efficiently using innerHTML

@cjyuan cjyuan added the Reviewed Volunteer to add when completing a review with trainee action still to take. label Apr 17, 2026
@fayaz551 fayaz551 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 Apr 17, 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.

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

@@ -1 +1 @@
let myLibrary = [];
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.

Safer to declare myLibrary using const.

Comment on lines +17 to +20
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 constants/variables at the beginning of the file (before function definition).

return;
}

const book = new Book(title, author, pages, checkInput.checked);
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 pages be a decimal number?

  • What is the valid range of page count?

@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 Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants