Skip to content

Conversation

@HassanOHOsman
Copy link

@HassanOHOsman HassanOHOsman commented Aug 6, 2025

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Implemented a book list app with features to add, view, and delete books, including title, author, page count, and read status.
Fixed bugs related to incorrect author assignment, broken delete button, read status display, and form validation.

Questions

Ask any questions you have for your reviewer.

@HassanOHOsman HassanOHOsman added 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Data Flows labels Aug 6, 2025
Copy link
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.

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

@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 8, 2025
@HassanOHOsman HassanOHOsman 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 Aug 11, 2025
@HassanOHOsman
Copy link
Author

HassanOHOsman commented Aug 11, 2025

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

Thanks CJ. I've updated my files with the suggested work accordingly.

Copy link
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.

Changes look good.

Comment on lines 43 to 46
if (isNaN(pagesInput.value) || pagesInput.value <= 0 || pagesInput.value > 10000) {
alert("Please enter a valid page count (1–10000).");
return false;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Indentation is a bit off.

Copy link
Author

Choose a reason for hiding this comment

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

My bad. Corrected now.

Comment on lines +30 to +33
titleInput.value = titleInput.value.trim().replace(/\s+/g, " ");
authorInput.value = authorInput.value.trim().replace(/\s+/g, " ");
pagesInput.value = pagesInput.value.trim();

Copy link
Contributor

Choose a reason for hiding this comment

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

Why not introduce variables with shorter names so that you don't have to type as much in the code?

Copy link
Author

Choose a reason for hiding this comment

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

Are the variable names that long? 😅 For example, I could've changed "titleInput" to "titleInpt" or "titInput" but I didn't want to compromise on the meaningfulness of the variables. Having said that, I'll aim to produce as much shorter & meaningful variable names in the future moving forward. Thank you CJ 😁

Comment on lines 92 to 98
let readStatus = "";
if (myLibrary[i].check == false) {
readStatus = "Yes";
} else {
readStatus = "No";
} else {
readStatus = "Yes";
}
changeBut.innerText = readStatus;
readBtn.innerText = readStatus;
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be a good opportunity to practice using the ? : conditional operator. Can you rewrite the code on lines 92-98 as a single statement?

Copy link
Author

Choose a reason for hiding this comment

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

Done. Thank you!

@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 11, 2025
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check its title is in the correct format, and update it.

Reason: Wrong number of parts separated by |s

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. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants