Skip to content

London | 26-ITP-Jan | Angela McLeary | Sprint 3 | Todo list app - #1141

Closed
AngelaMcLeary wants to merge 4 commits into
CodeYourFuture:mainfrom
AngelaMcLeary:Sprint-3/todo-list-app
Closed

London | 26-ITP-Jan | Angela McLeary | Sprint 3 | Todo list app#1141
AngelaMcLeary wants to merge 4 commits into
CodeYourFuture:mainfrom
AngelaMcLeary:Sprint-3/todo-list-app

Conversation

@AngelaMcLeary

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

Changelist

This PR is about a todo list whixh updates when you add an item to the list and once completed you are able to delete the completed items.

@AngelaMcLeary AngelaMcLeary added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 28, 2026
@Luro91 Luro91 added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Apr 6, 2026
<ul id="todo-list" class="todo-list">
</ul>

<!-- i added this -->

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this comment needed?

Comment thread Sprint-3/todo-list/script.mjs Outdated
const massDeleteBtn = document.querySelector("#delete-completed-btn");

// check if the button is even found in the HTML
// console.log("Button found:", massDeleteBtn);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It's good practice to remove code, that was used for testing, in the final product

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.

Hi @Luro91, Thanks for the feedback. I have cleaned the code up.

}

#delete-completed-btn:hover {
background-color: #e74c3c;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice styling

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.

Hi @Luro91, Thank you for your feedback. I like CSS.

Comment thread Sprint-3/todo-list/todos.mjs Outdated
Comment on lines +34 to +38
for (let i = todos.length - 1; i >= 0; i--) {
if (todos[i].completed) {
todos.splice(i, 1);
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The code works correctly.

You can also research build in array functions. There is one that allows you to filter elements from an array based on a condition

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.

Hi @Luro91, Thank you for your feedback. I have researched it and found that using filter() makes the functions cleaner. I have also updated the code.

@Luro91 Luro91 added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Apr 6, 2026
@AngelaMcLeary AngelaMcLeary added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 6, 2026
@Luro91

Luro91 commented Apr 6, 2026

Copy link
Copy Markdown

Well done 👍

@Luro91 Luro91 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. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Apr 6, 2026
@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