Skip to content

Conversation

sidicamoli
Copy link

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I 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

Briefly explain your PR.

Questions

Ask any questions you have for your reviewer.

@sidicamoli sidicamoli added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 23, 2025
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Aug 1, 2025
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

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

Hi, there seems to be a problem with the adding of new books that is making it difficult to test - can you have another look at this task?

<title>Chi's Book Library</title>
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/favicon.ico"

Choose a reason for hiding this comment

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

Which stylesheet are you trying to load here? Can you spot a problem with this line?

Copy link
Author

Choose a reason for hiding this comment

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

Thanks! I corrected the stylesheet link by removing the incorrect favicon.ico URL and linking the proper Bootstrap CSS URL.

render();
// Hook up the form submission
document.getElementById("bookForm").addEventListener("submit", function (e) {
e.preventDefault(); // Prevent page refresh

Choose a reason for hiding this comment

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

I can't seem to find a way to test the submit form - the button doesn't do anything. Can you see what the problem might be?

Copy link
Author

Choose a reason for hiding this comment

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

I made sure the submit button triggers the submitBook function by adding event listener after DOM loads and preventing default form behavior.

@LonMcGregor LonMcGregor 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 1, 2025
@sidicamoli
Copy link
Author

Hi, there seems to be a problem with the adding of new books that is making it difficult to test - can you have another look at this task?

Hello, Thanks for feedback! I fixed issue with adding new books by correctly hooking the form submit event and preventing default page reload.

@sidicamoli sidicamoli added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 1, 2025
@LonMcGregor
Copy link

Thanks for fixing that. Looking at the form, can you see any issues with input validation that might still be missing? Are there any restrictions on what page count should be?

Also, when I delete a book, it gives me an alert after the delete has happened. Is there a more useful interaction you could do instead of an alert here?

@LonMcGregor LonMcGregor removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 4, 2025
@sidicamoli
Copy link
Author

Thanks for fixing that. Looking at the form, can you see any issues with input validation that might still be missing? Are there any restrictions on what page count should be?

Also, when I delete a book, it gives me an alert after the delete has happened. Is there a more useful interaction you could do instead of an alert here?

Thanks for your feedback! There’s now no restriction on page count, but I’ve removed negative values during validation. Instead of an alert, I’ll show a temporary message after deleting. These changes help improve both validation and overall user experience.

@sidicamoli sidicamoli added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 5, 2025
@LonMcGregor
Copy link

LonMcGregor commented Aug 5, 2025

Well done with the input validation.

Changing the alert is a good idea.

You are done with this sprint now, you can close this PR

@LonMcGregor LonMcGregor added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Aug 5, 2025
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.

3 participants