Overview
Currently, the habit system allows users to define a title, icon, color, and frequency. However, there is no way for users to add additional context, goals, or reflections to a specific habit. Adding a "Notes" or "Description" section will allow users to keep track of extra details related to their habits.
Objectives
- Allow users to add a text-based description or notes to each habit.
- Ensure the notes are persistent and editable.
- Provide a clear UI/UX for viewing and managing these notes.
Technical Requirements
1. Database Schema
- Table:
public.habits
- Change: Add a new column
notes (Type: TEXT, nullable).
- Migration: Create a new SQL migration to add the column.
2. Frontend Integration
- Habit Form: Add a new textarea field in the Habit Creation and Habit Editing components.
- State Management: Update the
Habit type/interface to include the notes field.
- API/Hooks: Update
useHabits (or relevant hooks) to handle the new notes property during CRUD operations.
3. UI/UX Considerations
- Dashboard: Should the notes be visible on the main dashboard or only in a "Detail View"?
- Character Limit: Define if there should be a maximum length for notes (e.g., 500 characters).
- Placeholder: Use a helpful placeholder like "Add some context or motivation for this habit...".
Acceptance Criteria
Proposed Priority
- Priority: Medium
- Effort: Low/Medium
Overview
Currently, the habit system allows users to define a title, icon, color, and frequency. However, there is no way for users to add additional context, goals, or reflections to a specific habit. Adding a "Notes" or "Description" section will allow users to keep track of extra details related to their habits.
Objectives
Technical Requirements
1. Database Schema
public.habitsnotes(Type:TEXT, nullable).2. Frontend Integration
Habittype/interface to include thenotesfield.useHabits(or relevant hooks) to handle the newnotesproperty during CRUD operations.3. UI/UX Considerations
Acceptance Criteria
Proposed Priority