Skip to content

Glasgow | 26-ITP-Jan| Martin McLean |Sprint 2|Book Library#448

Closed
mjm-git185 wants to merge 7 commits into
CodeYourFuture:mainfrom
mjm-git185:leBibliateca
Closed

Glasgow | 26-ITP-Jan| Martin McLean |Sprint 2|Book Library#448
mjm-git185 wants to merge 7 commits into
CodeYourFuture:mainfrom
mjm-git185:leBibliateca

Conversation

@mjm-git185

Copy link
Copy Markdown

Changelist

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
my coursework

@github-actions

This comment has been minimized.

@mjm-git185 mjm-git185 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 16, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 16, 2026
@mjm-git185 mjm-git185 changed the title Glasgow | 26-ITP-Jan| Martin McLean |Sprint 2| libreiy Glasgow | 26-ITP-Jan| Martin McLean |Sprint 2|Book Library Apr 16, 2026
@mjm-git185 mjm-git185 added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Apr 16, 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.

@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 Apr 16, 2026
@mjm-git185 mjm-git185 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 17, 2026
Comment thread debugging/book-library/index.html
Comment thread debugging/book-library/script.js Outdated
Comment thread debugging/book-library/script.js Outdated
Comment thread debugging/book-library/script.js Outdated
Comment thread debugging/book-library/script.js Outdated
Comment thread debugging/book-library/script.js Outdated
Comment thread debugging/book-library/script.js Outdated
Comment on lines +79 to +82
myLibrary[i].check == true
? (readStatus = "Yes")
: (readStatus = "No");

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.

Normally way to use ? : is:

readStatus = myLibrary[i].check ? "Yes" : "No";

  • condition ? v1 : v2 is an expression. It evaluates to v1 if condition is true, and to v2 if condition is false.
  • .check is a boolean value. Comparing it to true is optional.

Comment thread debugging/book-library/script.js Outdated
Comment thread debugging/book-library/script.js Outdated
Comment thread debugging/book-library/script.js Outdated
@cjyuan cjyuan removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 17, 2026
@mjm-git185 mjm-git185 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 17, 2026
Comment thread debugging/book-library/index.html
Comment thread debugging/book-library/script.js Outdated
Comment on lines +26 to +27
const titleInput = document.getElementById("title").value.trimStart();
const authorInput = document.getElementById("author").value.trimStart();

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.

What about trailing space?

Comment thread debugging/book-library/script.js
Comment thread debugging/book-library/script.js Outdated
table.deleteRow(n);
while (table.rows.length > 1) {
table.deleteRow(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.

Clearing <tbody> is probably easier and more efficient.

@cjyuan cjyuan removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 18, 2026
@mjm-git185 mjm-git185 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 18, 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.

Other changes look good.

Comment thread debugging/book-library/script.js Outdated

function submit() {
const titleInput = document.getElementById("title").value.trim();
const authorInput = document.getElementById("author").value.trimStart();

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.

Why not also trim the trailing space in author's name?

@cjyuan cjyuan removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 18, 2026
@mjm-git185 mjm-git185 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 18, 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.

All good now.

@cjyuan cjyuan removed the Reviewed Volunteer to add when completing a review with trainee action still to take. label Apr 18, 2026
@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Apr 18, 2026
@mjm-git185

Copy link
Copy Markdown
Author

Thanks for all your help

@illicitonion

Copy link
Copy Markdown
Member

Closing PR because the January ITP run has finished. Feel free to re-open if you're still working on it.

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