docker / getting-started-todo-app

Sample application to get started with Docker
Apache License 2.0
31 stars 128 forks source link

[Bug]: ordering checked and unchecked to-do. #30

Open Jashwanth-rit opened 2 months ago

Jashwanth-rit commented 2 months ago

Issue: Ordering of Checked and Unchecked To-Dos

Bug Summary

When the to-do list is displayed, the ordering of checked (completed) and unchecked (incomplete) to-dos does not function as expected. The list should consistently show incomplete items at the top and completed items at the bottom. However, due to the current sorting logic, completed items can appear mixed in with incomplete items after reloading or updating the list.

Steps to Reproduce

  1. Load the to-do list application.
  2. Observe the initial order of items displayed.
  3. Mark some items as completed (checked).
  4. Add a new item to the list.
  5. Reload the page and observe the order of the items again.
  6. Check for consistent ordering: incomplete items should be at the top, and completed items should be at the bottom.

Expected Behavior

Actual Behavior

Impact

This bug affects user experience, as it can lead to confusion when users expect a clear visual distinction between completed and incomplete tasks.

Suggested Fix

Implement a consistent sorting function that ensures:

This fix should be applied in the component handling the rendering of the to-do list, particularly in the logic that processes both fetched data and user actions (adding, updating, or removing items).