Skip to content

Conversation

@MohammedNaru
Copy link

@MohammedNaru MohammedNaru commented Nov 28, 2025

Todo list Pull Request

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

Refactored file changes to meet requirements and pass tests.

Questions

No questions for reviewer.

@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Wrong number of parts separated by |s

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@MohammedNaru MohammedNaru changed the title Refactor: update todo list structure and functionality with Bootstrap integration West Midlands | ITP-Sept-2025 | Ali Naru | Sprint 3 | Todo list Nov 28, 2025
@github-actions
Copy link

Your PR description contained template fields which weren't filled in.

Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@MohammedNaru MohammedNaru added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Data-Groups The name of the module. labels Nov 28, 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.

Your implementation does not quite follow the instructions in README.md.
The main objective of this exercise is to practice

  • Modularizing code by separating UI and non-UI related code into separate files.
  • Testing the non-UI related functions independently.
  • Using ES module

On separate note, currently the deletion of individual Todo item is not working properly.

Comment on lines +5 to +7
function removeTodo(todos, todo) {
return todos.filter((t) => t !== todo);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

.filter() creates a new array. The original todos[] is not updated accordingly.

trashIcon.className = "fa fa-trash todo-icon";
trashIcon.setAttribute("aria-hidden", "true");
trashIcon.addEventListener("click", () => {
todos = removeTodo(todos, todo);
Copy link
Contributor

Choose a reason for hiding this comment

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

Line 34 only assigns an array to the local variable todos; it does not change the array passed to this function.

@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 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Data-Groups The name of the module. Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants