-
Notifications
You must be signed in to change notification settings - Fork 157
Description
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:
- Navigate to the memories page in the app
- Swipe left or right on any memory item to trigger the delete action
- Confirm the deletion if a confirmation dialog appears
- 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
- Open the app and navigate to the memories page
- Swipe to delete a memory
- Verify a notification appears at the bottom of the screen with "Memory Deleted" text
- Click the "Undo" button and verify the memory reappears in the list
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