Skip to content

LONDON_JAN25 | KHALIL ALI | MODULE_DATA_FLOWS | SPRINT 2 | BOOK_LIBRARY #204

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

khalil-ali1
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 COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Fix all book library project bugs.

Questions

Ask any questions you have for your reviewer.

@khalil-ali1 khalil-ali1 added the Needs Review Participant to add when requesting review label Apr 17, 2025
@cjyuan cjyuan added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Participant to add when requesting review labels Apr 17, 2025
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

According to https://validator.w3.org/, there are errors in your index.html. Can you fix these errors?

I also suggested some improvements for you to consider.

Comment on lines 57 to 59
for (let n = rowsNumber - 1; n > 0; n-- {
for (let n = rowsNumber - 1; n > 0; n--) {
table.deleteRow(n);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of deleting the table rows one by one, can you think of a more efficient way to remove all rows (except the <th>...</th>) in the table?

Copy link
Contributor

Choose a reason for hiding this comment

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

  • In terms of input validation,

    1. Are all input properly checked?
    2. Can .value be null? (Do we need to check someInputElement.value == null?)
    3. Do you want to allow book title and author name to contain only space characters?
    4. What if a user enters an invalid page number in the "pages" input field?
  • Lines 75, 93:

    • Are the values assigned to these id attributes unique?
    • Is there any need to assign an id attribute to either buttons?
  • Line 69:

    • The current method of assigning book titles to HTML elements can cause display issues if a title contains special character sequences like <i>.

Copy link
Author

Choose a reason for hiding this comment

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

  • i. I have checked all input properly
  • ii. .value can not be null.
  • iii. .trim() deletes all spaces
  • iv. the "pages" input should not be empty and should be a positive integer

id attributes are not unique
There is no need to assign id attributes to either buttons

you are right. I used textContent instead of innerhtml

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Apr 17, 2025
@khalil-ali1
Copy link
Author

I used https://validator.w3.org/ to check my HTML file.
I fixed the code and got the "No errors or warnings to show" message.

@khalil-ali1 khalil-ali1 added the Complete Volunteer to add when work is complete and review comments have been addressed label Apr 21, 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 review comments have been addressed Reviewed Volunteer to add when completing a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants