Skip to content

LONDON | 25-ITP-25 | TEWODROS BEKERE | SPRINT-3 | ToDo-List #735

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 1 commit into
base: main
Choose a base branch
from

Conversation

iteddy16
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 Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

  • Add JS function to handle adding new to-do tasks, complete and undo tasks, delete tasks, and delete all completed tasks at once.
  • Add CSS Style for a better user visualization.

Briefly explain your PR.

  • This PR accepts a new Task from the user, displays it in the HTML home page.
  • Mark the completed task strikthrough at the task words.
  • Make the task complete and undo if modification is needed.
  • Delete the tasks one by one using the delete button.
  • Also, handle the deletion of all completed tasks at once.

Questions

Ask any questions you have for your reviewer.

…lete and delete all completed tasks from the todo list and add CSS for a better visualization.
@iteddy16 iteddy16 added 📅 Sprint 3 Assigned during Sprint 3 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jul 31, 2025
@jenny-alexander jenny-alexander self-requested a review August 10, 2025 23:22
@jenny-alexander jenny-alexander 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 Aug 10, 2025
<body>
<div class=" container">
<h1> Todo List</h1>
<form class=""add-todo-form>

Choose a reason for hiding this comment

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

At line 40, there is a small typo. Can you find it and fix?

@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!--<!DOCTYPE html>

Choose a reason for hiding this comment

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

It's best to completely remove the commented-out code from the file.

Choose a reason for hiding this comment

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

  • I see a few typos where an extra space has been added before the title of an element or a CSS class name. Can you review your file and fix these typos?

  • 💡 Are you using VSCode? If yes, you can right-click within the code, and choose 'Format Document'. This will align your code nicely and make it easier to read!

Choose a reason for hiding this comment

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

While running the Lighthouse accessibility report, a few issues came up that should be fixed:

  • The background and foreground colours chosen on the button don't have a high enough contrast ratio, making it hard to read for some people.
  • The <meta name="viewport"> tag is missing.

@@ -24,4 +25,28 @@
</form>
<script src="script.js"></script>
</body>
</html>-->

Choose a reason for hiding this comment

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

The --> appears on the UI of your application. Can you adjust your html file so this isn't visible?

Image

@@ -1,8 +1,41 @@
function populateTodoList(todos) {
let list = document.getElementById("todo-list");
// Write your code to create todo list elements with completed and delete buttons here, all todos should display inside the "todo-list" element.
list.innerHTML = ""; // clears the available list
if (todos.length === 0) {

Choose a reason for hiding this comment

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

Nice example of an early return at lines 5-8. 👍

Choose a reason for hiding this comment

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

Your JS code is written well and I'm able to interact with your to-do list with ease. I have a items for your to review and implement in order to make your code more robust.

  • Replace all let with const (as long as the variable is not being reassigned any values).
  • Format the javascript code to be easier to read (right-click -> Format Document).

background-color: #da190b;
}

.empty-state {

Choose a reason for hiding this comment

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

Can you verify if .empty-state is needed?

Choose a reason for hiding this comment

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

This is only a suggestion. You do not need to implement for this PR.

💡Since you are using a lot of different blues and greens within your CSS file, it might be easier to maintain them by defining them at the top of the file. For example:

:root {
  --primary-blue: #3936f4;
  --primary-green: #085a13;
  --accent-red: #dd1024;
}

Then use var(--primary-blue) etc. within your CSS selector definitions.

}

// Try to find delete all completed button
let deleteAllBtn =

Choose a reason for hiding this comment

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

If there isn't an item in the list, can you think of a way to disable the 'Delete All Complete' button. Ideally, the user shouldn't be able to click on the button if there aren't any items to delete!

@jenny-alexander jenny-alexander 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 Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 3 Assigned during Sprint 3 of this module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants