Skip to content

London | 26-ITP-Sep | Bartosz Kawiak | Sprint 2 | Debugging - #602

Open
bartoszkawiak wants to merge 3 commits into
CodeYourFuture:mainfrom
bartoszkawiak:book-library
Open

bartoszkawiak wants to merge 3 commits into
CodeYourFuture:mainfrom
bartoszkawiak:book-library

Conversation

@bartoszkawiak

Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • 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

Task code

CYF-1122

Changelist

Bugs fixed in script.js, index.html also checked with lighthouse and styling was adjusted.

@bartoszkawiak bartoszkawiak added 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Data-Flows The name of the module. labels Nov 23, 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.

Comment on lines +44 to +51
id="author"
name="author"
required
/>
<label for="pages">Pages:</label>
<input
type="number"
min="1"

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 find out why the constraints such such as required and min="1" are not enforced by the browser?

Note: The alert dialog box is produced by the script and not because of the browser enforcing the constraints.

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.

Thanks CJ, The inputs were inside a div instead of a form, and I was calling the submit function directly using onclick. I've replaced the div with a form and added a submit event listener

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.

I had a look at the guidelines and made adjustments. Thank you CJ

@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 Nov 28, 2026
@bartoszkawiak bartoszkawiak added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Dec 1, 2026
@cjyuan

cjyuan commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Have you followed the link of the general feedback I shared with you in the previous comment and gone through it?

@cjyuan cjyuan removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Dec 2, 2026
@bartoszkawiak bartoszkawiak added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Dec 2, 2026
@bartoszkawiak
bartoszkawiak requested a review from cjyuan December 2, 2026 17:55
@bartoszkawiak bartoszkawiak 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 Dec 2, 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 great. Well done!

Comment on lines +10 to 17
window.addEventListener("load", function () {
populateStorage();
render();
});

form.addEventListener("submit", function (event) {
event.preventDefault();
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.

Note: Code on lines 14-17 is also "code to be executed once on page load". So you could consider placing the the code within the window's onload callback function on lines 10-12.

Comment on lines 97 to +98
render();
alert(`You've deleted title: ${deletedTitle}`);

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: alert() is a blocking function call. As a result, even if it is invoked after calling render(), it will still prevent 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 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. labels Dec 2, 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. Module-Data-Flows The name of the module. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants