-
-
Notifications
You must be signed in to change notification settings - Fork 125
London | ITP-May-25 | Mohamed Ibrahim | Module-Data-Flows | Sprint-2 | Book-Library-Debugging #231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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?
debugging/book-library/index.html
Outdated
<title>Chi's Book Library</title> | ||
<link | ||
rel="stylesheet" | ||
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/favicon.ico" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
debugging/book-library/script.js
Outdated
render(); | ||
// Hook up the form submission | ||
document.getElementById("bookForm").addEventListener("submit", function (e) { | ||
e.preventDefault(); // Prevent page refresh |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Hello, Thanks for feedback! I fixed issue with adding new books by correctly hooking the form submit event and preventing default page reload. |
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 |
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. |
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 |
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.