Skip to content

Swipe left to delete #148

Description

@MessiasLima

Description

Add a swipe-left gesture to the task row component that deletes a task. Swiping left on a task row reveals a red background with a trash icon. Releasing the swipe triggers a confirmation modal that asks the user to confirm the deletion.

The confirmation modal clearly states that the action is irreversible and there is no undo. The modal has two actions: "I'm sure" (confirms deletion) and "Cancel" (dismisses the modal and keeps the task).

This is a hard delete — the task is permanently removed from the repository. There is no undo or soft-delete mechanism.

The swipe gesture works on both the Today and Upcoming screens.

This ticket also includes updating the designs for the task row to show the swipe-left visual.

Depends on #128 (Task row component), #120 (Task domain model and data layer).

Scope

In scope: swipe-left gesture on task rows, red background with trash icon during swipe, confirmation modal with "I'm sure" and "Cancel" actions, hard delete from the repository, updated designs for the swipe action and confirmation modal, and string resources.

Out of scope: swipe right to mark as done (separate ticket #21), soft-delete mechanism, undo functionality.

Acceptance criteria

  • GIVEN the swipe-left gesture design has been created
    WHEN the designs are reviewed
    THEN the designs show the red background and trash icon revealed during the swipe
  • GIVEN the user swipes left on a task row
    WHEN the swipe is in progress
    THEN a red background with a trash icon is revealed behind the row
  • GIVEN the user swipes left on a task row
    WHEN the swipe is completed
    THEN a confirmation modal appears
  • GIVEN the confirmation modal is shown
    WHEN the modal renders
    THEN it clearly states that the deletion is irreversible and there is no undo
  • GIVEN the confirmation modal is shown
    WHEN the user taps "Cancel"
    THEN the modal is dismissed and the task is not deleted
  • GIVEN the confirmation modal is shown
    WHEN the user taps "I'm sure"
    THEN the task is permanently deleted from the repository
  • GIVEN a task has been deleted
    WHEN the user returns to the task list
    THEN the deleted task is no longer visible
  • GIVEN the swipe gesture is performed on the Upcoming screen
    WHEN the swipe is completed
    THEN the same confirmation flow is triggered
  • GIVEN user-visible text appears in the confirmation modal
    WHEN the app renders it
    THEN all visible text comes from string resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions