Skip to content

Sheffield | 26-ITP-Jan | Mahmoud Shaabo | Sprint 3 | ToDo List App#1136

Open
mahmoudshaabo1984 wants to merge 1 commit intoCodeYourFuture:mainfrom
mahmoudshaabo1984:todo-list-app
Open

Sheffield | 26-ITP-Jan | Mahmoud Shaabo | Sprint 3 | ToDo List App#1136
mahmoudshaabo1984 wants to merge 1 commit intoCodeYourFuture:mainfrom
mahmoudshaabo1984:todo-list-app

Conversation

@mahmoudshaabo1984
Copy link
Copy Markdown

Hello Reviewers / CodeYourFuture Team,

I have completed the ToDo List App project for Sprint 3. I am excited to share that I have successfully implemented the mandatory requirement for the mass delete feature.

🎯 Acceptance Criteria Met:

  • UI Update: Added a "Delete completed tasks" button to index.html with the correct ID.
  • Logic Implementation: Created the deleteCompleted(todoList) function in todos.mjs to remove all completed tasks.
  • Testing: Wrote passing Jest tests in todos.test.mjs to verify the logic works correctly (including edge cases).
  • Integration: Connected the new button to the deleteCompletedTodos function in script.mjs and successfully updated the DOM.

💻 Technical Implementation Details:

  • Utilized a reverse for loop in the deleteCompleted function. This approach ensures that modifying the array length during iteration does not cause index shifting or skip any items, which is a common issue when using splice() in a standard forward loop.
  • Ensured all modular imports/exports work correctly as ES Modules.
  • All Jest tests (npm test) are passing successfully.

Thank you for your time and feedback!

Best regards,
Mahmoud Shaabo

@mahmoudshaabo1984 mahmoudshaabo1984 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 28, 2026
@mahmoudshaabo1984
Copy link
Copy Markdown
Author

Hi @cifarquhar,

As I submit my Pull Request for the ToDo List App, I want to take a moment to thank you for all your efforts and the valuable knowledge you share with us in this course.

For this task, I have successfully implemented the mass delete feature for completed ToDos, making sure the business logic in todos.mjs is correctly separated from the UI in script.mjs. All Jest tests are also passing successfully.

Thank you again for your time and continuous support!

Best regards,
Mahmoud Shaabo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant