Skip to content

Conversation

akshay0611
Copy link
Contributor

This PR enhances the habit editing experience in the My Habits section of the Habit Builder, addressing issue #342.

Changes Introduced

  • Added inline habit editing form within the habit's expander.

  • Pre-fills form with existing habit details:

    • Habit name
    • Category
    • Difficulty
    • Notes
    • Reminder time
  • Added 💾 Save Changes and ❌ Cancel options for seamless updates.

  • Improves usability by letting users update habits without deleting and recreating them.

Technical Details

  • Leveraged st.session_state to track and manage editing state per habit (ensuring only one habit is editable at a time).

  • Used conditional rendering to switch between:

    • Normal view → Habit details & action buttons.
    • Editing view → Input form with save/cancel options.
  • Handled datetime.time conversion for st.time_input and back to string for reliable storage.

Screenshot

image image

Linked Issue

Closes #342

- Implement task editing functionality with save/cancel options
- Replace index-based task management with UUID keys
- Add session state variables for editing mode
- Improve task deletion to avoid re-indexing issues
Show balloons and success message when all tasks are marked as completed to provide positive reinforcement
Implement habit editing feature with form inputs for name, category, difficulty, reminder time and notes. The edit mode can be toggled with an edit button and changes are saved or canceled with corresponding buttons.
@pkbros pkbros added enhancement New feature or request gssoc25 level 3 labels Oct 2, 2025
@pkbros pkbros merged commit 1c92b42 into eccentriccoder01:main Oct 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gssoc25 level 3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat: Implement improved habit editing in Habit Builder
2 participants