Sheffield | 26-ITP-Jan | Mahmoud Shaabo | Sprint 2 | Book Library#450
Sheffield | 26-ITP-Jan | Mahmoud Shaabo | Sprint 2 | Book Library#450mahmoudshaabo1984 wants to merge 2 commits intoCodeYourFuture:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
|
Hi @cifarquhar — PR #450 is ready for review. I have fixed all 5 bugs listed in the readme.md file. The app now loads correctly, books can be added and deleted, and the read status toggles as expected. Please let me know if anything needs to be changed. Thank you! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
cjyuan
left a comment
There was a problem hiding this comment.
You have fixed all the bugs, but there are still plenty of room you can improve the code.
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.
|
Hi CJ, Thank you for your feedback. I have reviewed your comments and applied the following improvements: script.js
index.html
Please let me know if there is anything else to improve. Thank you, |
What bugs did I fix?
Bug 1 - Website loads but doesn't show any books
The
forloop in therenderfunction was missing a closing parenthesis)before the{. This caused a syntax error that stopped all JavaScript from running.Bug 2 - Error in console when you try to add a book
The
submitfunction was callinglibrary.push(book)but the array is namedmyLibrary. Fixed by using the correct variable name. Also added validation for the author field.Bug 3 - It uses the title name as the author name
In the
submitfunction,title.valuewas used twice. The second argument should beauthor.value.Bug 4 - Delete button is broken
The delete button variable was created as
delButtonbut then referenced asdelButthree times. Also the event name was"clicks"instead of"click". Fixed both issues.Bug 5 - Read status saves the wrong answer
The
ifcondition was inverted.check == falsewas showing "Yes". Fixed socheck == truecorrectly shows "Yes".How to test
index.htmlin the browserHi @cifarquhar — I have fixed all 5 bugs listed in the readme. Please let me know if you have any feedback. Thank you!