Merged
Conversation
- Updated English and Spanish localization files to include new entries for archiving and restoring habits, enhancing user guidance and experience. - Added titles, descriptions, and toast messages for both archiving and restoring functionalities, ensuring clarity in user interactions.
- Introduced useRestoreHabit custom hook to restore archived habits by updating the archived_at timestamp. - Enhanced UI store to manage states for restoring habits, including modal open/close actions. - Updated query invalidation logic to refresh habit lists upon successful restoration, improving data consistency.
- Added an actions menu for each archived habit, allowing users to restore or delete habits directly from the UI. - Implemented RestoreHabitConfirmModal for confirming restoration of habits, improving user interaction and feedback. - Integrated state management for handling selected habits and modal visibility, enhancing overall functionality.
…tionality - Added ArchiveHabitConfirmModal component for confirming habit archiving actions, enhancing user interaction. - Updated HabitCard to include an archive button, allowing users to initiate the archiving process directly from the habit list. - Integrated modal into HabitList for seamless user experience when archiving habits.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
This PR implements the "Archive Habit" feature and enhances the management of archived habits by adding restore and permanent delete actions. It also includes UI fixes for better menu visibility and avoids hydration errors in modals.
🔗 Related Issue
Closes #85
🏷️ Type of Change
🔄 Changes Made
HabitCardactions menu in management mode.ArchivedHabitsSectionallowing users to "Restore" or "Delete" archived habits.ArchiveHabitConfirmModalandRestoreHabitConfirmModalcomponents.useRestoreHabithook inhooks/useHabits.tsto complement the existinguseArchiveHabitlogic.useUIStoreto manage visibility of the new confirmation modals.en.json) and Spanish (es.json).🧪 Testing
HabitCardtests pass.✅ Checklist
📸 Screenshots (if applicable)
2026-01-18.11-57-55.mp4
📌 Additional Notes
The archiving system preserves all historical logs and data, allowing for a complete restoration of the streak and progress when a habit is unarchived.