Skip to content

Cape Town | 26-ITP-Sept | Leigh Ross | Sprint 2 | Book Library - #612

Open
leigh-ross wants to merge 1 commit into
CodeYourFuture:mainfrom
leigh-ross:coursework/sprint-2
Open

leigh-ross wants to merge 1 commit into
CodeYourFuture:mainfrom
leigh-ross:coursework/sprint-2

Conversation

@leigh-ross

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

Task code

CYF-1122

Changelist

CHANGELOG — Book Library

BUG 1 — No books on load
Cause: render() crashed on first loop iteration (see Bug 2).
Fix: Fixed undefined variable; removed duplicate render() call.

BUG 2 — Error on add
Cause: delBut was undefined (declared as delButton).
Fix: Consistent naming; extracted deleteBookButton(index, cell).

BUG 3 — Title used as author
Cause: new Book(title.value, title.value, ...)
Fix: new Book(title.value, author.value, ...)

BUG 4 — Delete button broken
Cause: name mismatch, "clicks" typo, out-of-scope i/deleteCell.
Fix: deleteBookButton(index, cell), "click", consistent names.

BUG 5 — Read status wrong
Cause: inverted logic in render().
Fix: false -> "No", true -> "Yes".

SPEC — Missing fields should alert
Cause: author unguarded; "" check missed whitespace.
Fix: if (!title.value.trim() || !author.value.trim() ||
!pages.value.trim()) { alert(...); return; }

CLEANUP

  • Seed pages: string -> number.
  • Removed console.log from render loop.
  • Removed duplicate render() in populateStorage().

@github-actions

This comment has been minimized.

@leigh-ross leigh-ross added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 30, 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 Nov 30, 2026
@leigh-ross leigh-ross changed the title Cape Town | 26-ITP-Sept | Leigh Ross | Book Library Cape Town | 26-ITP-Sept | Leigh Ross | Sprint 2 | Book Library Nov 30, 2026
@leigh-ross leigh-ross added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Dec 1, 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 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.

@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 Dec 2, 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