Skip to content

Cape Town | 26-ITP-May | Enice Mutanda | Sprint 2 | Book Library - #567

Open
Enice-Codes wants to merge 2 commits into
CodeYourFuture:mainfrom
Enice-Codes:Feature/book-library
Open

Cape Town | 26-ITP-May | Enice Mutanda | Sprint 2 | Book Library#567
Enice-Codes wants to merge 2 commits into
CodeYourFuture:mainfrom
Enice-Codes:Feature/book-library

Conversation

@Enice-Codes

Copy link
Copy Markdown

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

index.html*

  • Added a proper page <title>
  • Split the malformed combined charset/viewport <meta> tag into two valid tags
  • Fixed invalid input types (type="title", type="author") to type="text"
  • Properly associated the "Read" checkbox label with its id using for

script.js

  • Fixed typo in "Robinson Crusoe" book title
  • Fixed submit() referencing an undefined library variable — now correctly uses myLibrary
  • Fixed submit() passing title.value twice instead of author.value when creating a new book
  • Fixed missing closing parenthesis in the render() for-loop (syntax error)
  • Fixed mismatched delButton/delBut variable names causing a reference error
  • Fixed "clicks" typo in event listener — corrected to "click" so the delete button works
  • Fixed read/unread status logic so the button label matches the book's actual read state

 correct invalid HTML in book-library form

- Add proper page title
- Split malformed charset/viewport meta tag into two valid tags
- Fix invalid input types (title/author) to type="text"
- Properly associate checkbox label with for/id

- Fix Robinson Crusoe title typo
- Use myLibrary instead of undefined library in submit()
- Pass author.value instead of duplicate title.value
- Add missing closing parenthesis in render() loop
- Fix delButton variable name mismatch
- Correct "clicks" event typo to "click"
- Fix read/unread status logic
@Enice-Codes Enice-Codes added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 19, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 19, 2026
@github-actions

This comment has been minimized.

@Enice-Codes Enice-Codes added the NotCoursework A PR that edits material in the module. Needs review by the curriculum team. label Aug 19, 2026
@cjyuan cjyuan changed the title Cape Town | 26-ITP-May |Enice Mutanda | Sprint 3| Feature/book library Cape Town | 26-ITP-May | Enice Mutanda | Sprint 2 | Book Library Aug 21, 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.

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

Comment on lines 47 to 53
@@ -53,14 +51,17 @@ <h1>Library</h1>
name="pages"
required
/>

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.

Why not make this input element to accept only positive whole number?

Comment on lines 38 to 44
<input
type="author"
type="text"
class="form-control"
id="author"
name="author"
required
/>

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 browser checks the input elements against the specified constraints when a user submits a form.
Without <form>, the browser won't enforce the "required" constraint.

Comment on lines +55 to 63
<label class="form-check-label" for="check">
<input
type="checkbox"
class="form-check-input"
id="check"
value=""
/>Read
name="check"
/>
Read
</label>

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.

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

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

Comment on lines +10 to 16
let book1 = new Book("Robinson Crusoe", "Daniel Defoe", "252", true);
let book2 = new Book(
"The Old Man and the Sea",
"Ernest Hemingway",
"127",
true
);

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.

Why represent pages using two different types of data?

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed NotCoursework A PR that edits material in the module. Needs review by the curriculum team. labels Aug 21, 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