Skip to content

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

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

London | 26-ITP-May | Mandip Sanger | Sprint 2 | Book Library#569
mandipsanger wants to merge 8 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 on lines 62 to 71
<label for="pages">Pages:</label>
<input
type="number"
class="form-control"
id="pages"
name="pages"
min="1"
step="1"
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 only when a user submits a form.
Without <form>, the browser won't enforce the constraints like required or min="1".

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.

please check some changes i have made

Comment on lines 74 to 81
<label class="form-check-label">
<input
type="checkbox"
class="form-check-input"
id="check"
value=""
/>Read
/>
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.

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

type="submit"
value="Submit"
class="btn btn-primary"
onclick="submit();"

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 lookup the trade off between

  • Assigning event listener in HTML
  • Assigning event listener in JS via .addEventListener()

@@ -1,46 +1,64 @@
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 +45 to +47
title.value,
author.value,
pages.value,

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.

These are raw input.

What if title.value is " Some title " or " "? What if pages.value is "00030" or "3e1"? These values could pass the checks on lines 30 and 38.

Comment on lines 19 to 22
const title = document.getElementById("title");
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?

title.value = "";
author.value = "";
pages.value = "";
check.checked = false;

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.

If these input elements are in a form, we could just call a form's method to reset all elements.

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 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 added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 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

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants