Skip to content

Add dynamic task-name filter to Todo list UI#27

Open
Copilot wants to merge 1 commit into
mainfrom
copilot/fr-03-filtrado-dinamico-nombre
Open

Add dynamic task-name filter to Todo list UI#27
Copilot wants to merge 1 commit into
mainfrom
copilot/fr-03-filtrado-dinamico-nombre

Conversation

Copilot AI commented May 28, 2026

Copy link
Copy Markdown

FR-03 requires users to quickly find tasks in the current list via a text filter located at the top of the app. This change adds real-time title filtering without altering backend APIs.

  • UI: top-level filter input

    • Added #taskFilter above the creation form in frontend/index.html.
    • Included accessible labeling and search-oriented placeholder text.
  • Rendering flow: client-side dynamic filtering

    • Introduced currentTasks as the in-memory source of truth for the loaded list.
    • Added renderTasks() to centralize list rendering and apply case-insensitive title matching.
    • Wired taskFilter to input events for immediate updates while typing.
    • Updated task creation flow to append to currentTasks and re-render through the same path.
  • Styling: visual consistency with existing themes

    • Added #taskFilter styles in frontend/style.css using existing theme variables (--input-bg, --text-color, focus shadow tokens), preserving light/dark behavior.
function renderTasks() {
  const filterValue = taskFilter.value.trim().toLowerCase();
  taskList.innerHTML = '';
  currentTasks
    .filter(task => task.title.toLowerCase().includes(filterValue))
    .forEach(addTaskToDOM);
}

taskFilter.addEventListener('input', renderTasks);

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants