Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement habit deletion #148

Open
wants to merge 1 commit into
base: 12-22-edit_habit
Choose a base branch
from

Conversation

owengretzinger
Copy link
Collaborator

@owengretzinger owengretzinger commented Dec 22, 2024

TL;DR

Added the ability to delete habits from the app through both the habit card menu and edit screen.

Screen.Recording.2024-12-22.at.5.03.15.PM.mov

What changed?

  • Created a new useDeleteHabit mutation hook for handling habit deletion
  • Added a delete button to the habit edit screen with confirmation dialog
  • Implemented delete functionality in the habit card's menu
  • Fixed habit order management to properly handle habit deletion
  • Updated mock habits implementation to correctly handle state updates

How to test?

  1. Create a new habit
  2. Try deleting it through:
    • The three-dot menu on the habit card
    • The delete button on the edit screen
  3. Verify that:
    • A confirmation dialog appears when deleting from the edit screen
    • The habit is removed from the list
    • The habit order is maintained correctly
    • A success toast message appears after deletion

Copy link
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@owengretzinger owengretzinger changed the title delete habit feat: implement habit deletion Dec 22, 2024
@owengretzinger owengretzinger marked this pull request as ready for review December 22, 2024 22:02
Copy link

graphite-app bot commented Dec 22, 2024

Graphite Automations

"Request reviewers once CI passes" took an action on this PR • (12/22/24)

1 reviewer was added to this PR based on Owen Gretzinger's automation.

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.

1 participant