Skip to content

London | 26-ITP-May | Mandip Sanger | Sprint 2 | Book Library - #569

Open
mandipsanger wants to merge 10 commits into
CodeYourFuture:mainfrom
mandipsanger:book-library
Open

London | 26-ITP-May | Mandip Sanger | Sprint 2 | Book Library#569
mandipsanger wants to merge 10 commits into
CodeYourFuture:mainfrom
mandipsanger:book-library

Conversation

@mandipsanger

@mandipsanger mandipsanger commented Aug 20, 2026

Copy link
Copy Markdown

Self cheklist

  • 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
    Sprint 2 Data flows book library

@github-actions

This comment has been minimized.

@mandipsanger mandipsanger changed the title London | 26-ITP-May | Mandip Sanger | Sprint 3 | Book library London | 26-ITP-May | Mandip Sanger | Sprint 2 | Book library Aug 20, 2026
@github-actions

This comment has been minimized.

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

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.

@cjyuan cjyuan added the Reviewed Volunteer to add when completing a review with trainee action still to take. label Aug 20, 2026
@mandipsanger mandipsanger added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 21, 2026
@mandipsanger mandipsanger changed the title London | 26-ITP-May | Mandip Sanger | Sprint 2 | Book library London | 26-ITP-May | Mandip Sanger | Sprint 3 | Book library Aug 21, 2026
@mandipsanger mandipsanger changed the title London | 26-ITP-May | Mandip Sanger | Sprint 3 | Book library London | 26-ITP-May | Mandip Sanger | Sprint 2 | Book library Aug 21, 2026
@mandipsanger

Copy link
Copy Markdown
Author

My Program is working now but failing checks Validate PR Metadata workflow run.

@mandipsanger mandipsanger changed the title London | 26-ITP-May | Mandip Sanger | Sprint 2 | Book library London | 26-ITP-May | Mandip Sanger | Sprint 2 | Book-library Aug 21, 2026
@mandipsanger mandipsanger changed the title London | 26-ITP-May | Mandip Sanger | Sprint 2 | Book-library London | 26-ITP-May | Mandip Sanger | Sprint 2 | Book Library Aug 21, 2026
@mandipsanger

Copy link
Copy Markdown
Author

its showing Validate PR Metadata
2s
Run args=("/tmp/pr-metadata-validator")

thread 'main' (2352) panicked at src/bin/pr-metadata-validator.rs:74:6:
Failed to validate PR: UserFacing("Failed to parse issue #571 - no submit label.\n\nIf this issue was made my a curriculum team member it should be given a sprint label.\nIf this issue was created by a trainee for step submission, it should probably be closed (and they should create the issue in their fork).")
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
Error: Process completed with exit code 101.
do you have any idea

Comment thread debugging/book-library/index.html Outdated
Comment thread debugging/book-library/index.html Outdated
Comment thread debugging/book-library/index.html Outdated
Comment thread debugging/book-library/script.js Outdated
Comment thread debugging/book-library/script.js Outdated
Comment thread debugging/book-library/script.js Outdated
Comment on lines 19 to 22
@@ -25,22 +21,44 @@ const author = document.getElementById("author");
const pages = document.getElementById("pages");
const check = 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.

Could you name these variables to emphasise that they are input elements?

Comment thread debugging/book-library/script.js Outdated
Comment on lines +76 to 78
for (let n = rowsNumber - 1; n > 0; n--) {
table.deleteRow(n);
}

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 look up a more efficient approach (than deleting table rows one by one) to clear the <tbody> part of a table?

Comment thread debugging/book-library/script.js Outdated
Comment on lines 110 to 113
alert(`You've deleted title: ${myLibrary[i].title}`);

myLibrary.splice(i, 1);
render();

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 alert message is shown before the book is actually deleted; the deletion only occurs after the alert dialog is dismissed. This introduces a risk that the operation may not complete (e.g., if the user closes the browser before dismissing the alert).

In general, it’s better to display a confirmation message only after the associated operation has successfully completed.


alert() is a blocking function call. As a result, invoking it prevents the browser from updating the UI until the dialog is dismissed.

If time permits, research for approaches that allows the UI to update before displaying the alert dialog. (This is an optional change).

@cjyuan cjyuan removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 21, 2026
@mandipsanger mandipsanger 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 21, 2026
@mandipsanger mandipsanger removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 21, 2026
@mandipsanger mandipsanger added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 21, 2026
@cjyuan

cjyuan commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

If you have made any changes, you need to push the commits to GitHub.

@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 21, 2026
@mandipsanger

Copy link
Copy Markdown
Author

i tried my best. I think i am tired now

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

Changes look good.

const pageNumber = Number(pagesValue);

// Check that pages is greater than zero
if (pageNumber <= 0) {

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.

Note: Could also consider using Number.isInteger() on line 54 instead of using regular expression on line 45.

@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 21, 2026
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.

2 participants