Skip to content

Issue #10 - [FEATURE] Add undo functionality for memories deleted by swiping #16

@rogelio-cmj

Description

@rogelio-cmj

Motivation

Currently, when users swipe to delete a memory in the app, the deletion is immediate and irreversible. This creates a poor user experience because accidental swipes can permanently remove important memories without any way to recover them.

Current Behavior

When a user swipes on a memory item to delete it, the memory is immediately removed from the local list and a server request is made to delete it permanently. There is no opportunity to undo this action, and the memory cannot be recovered once deleted.

Reproduction Steps:

  1. Navigate to the memories page in the app
  2. Swipe left or right on any memory item to trigger the delete action
  3. Confirm the deletion if a confirmation dialog appears
  4. Observe: The memory disappears immediately from the list with no way to recover it

Expected Behavior

When a user deletes a memory by swiping, a temporary notification should appear at the bottom of the screen informing them that the memory was deleted and offering an "Undo" option. The actual server deletion should be deferred for a reasonable time period (e.g., 10 seconds) to allow the user to undo the action. If the user clicks "Undo" within this timeframe, the memory should be restored to the list. If the notification times out or is dismissed, the deletion should proceed on the server.

Acceptance Criteria:

  • A notification appears at the bottom of the screen when a memory is deleted by swiping
  • The notification displays "Memory Deleted" text and includes an "Undo" button and a close button
  • Clicking "Undo" restores the deleted memory to the memories list in its original position
  • The notification automatically disappears after 10 seconds if no action is taken

Steps to Test

  1. Open the app and navigate to the memories page
  2. Swipe to delete a memory
  3. Verify a notification appears at the bottom of the screen with "Memory Deleted" text
  4. Click the "Undo" button and verify the memory reappears in the list

BasedHardware#2808

Submission

Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.

Guide to submitting pull requests: https://hackmd.io/@timothy1ee/Hky8kV3hlx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions