Skip to content

Conversation

@tamaskozmer
Copy link
Contributor

@tamaskozmer tamaskozmer commented Nov 3, 2025

Summary

Implements interactive functionality for the To-Do List feature including swipe-to-done, checkbox toggle, undo capabilities, and badge count updates.

Features Implemented

  • Swipe Actions: Swipe left/right to mark items as done or undo with smooth animations and fade-in text/icon
  • Checkbox Toggle: Tap checkbox to mark items as complete or incomplete
  • Undo Snackbar: Shows snackbar with undo action when marking items as done
  • Offline Detection: Displays appropriate message when attempting actions offline
  • Haptic Feedback: Provides tactile feedback on swipe threshold and checkbox toggle
  • Cache Invalidation: Invalidates planner cache after successful state changes
  • Badge Count Updates: Emits to-do count changes to update navigation badge
  • Architecture Refactoring: Migrated from ActionHandler pattern to callback pattern in UiState
  • Comprehensive Tests: Added 16 new unit tests covering all new functionality

Technical Details

  • Optimistic UI updates with error rollback
  • PlannerOverride API integration for state persistence
  • NetworkStateProvider integration for offline detection
  • OnToDoCountChanged interface for badge updates
  • Fade-in animation based on swipe progress (alpha 0-1)

Test plan

  1. Enable the todo_redesign feature flag
  2. Navigate to the To Do List screen
  3. Swipe Actions:
    • Swipe items left/right to mark as done/undo
    • Verify haptic feedback occurs at swipe threshold
    • Verify text/icon fades in gradually while swiping
    • Verify item returns to center after swipe completes
  4. Checkbox Toggle:
    • Tap checkbox to mark items complete/incomplete
    • Verify haptic feedback on checkbox toggle
  5. Undo Functionality:
    • Mark an item as done (via swipe or checkbox)
    • Verify undo snackbar appears with item title
    • Tap undo in snackbar to revert the action
    • Verify snackbar auto-dismisses after timeout
  6. Offline Behavior:
    • Disable network connection
    • Attempt to mark item as done
    • Verify offline snackbar appears
  7. Badge Count:
    • Verify badge count updates when items are marked done/undone
    • Check navigation drawer badge shows correct count
  8. Unit Tests:
    • Run: ./gradle/gradlew -p apps :pandautils:testDebugUnitTest --tests "ToDoListViewModelTest"
    • Verify all 35 tests pass (19 existing + 16 new)

Manual Testing

  • Tested swipe gesture with smooth animations and fade-in effects
  • Tested checkbox toggle with haptic feedback
  • Tested undo snackbar functionality with various scenarios
  • Tested offline detection with airplane mode
  • Tested badge count updates across different item states
  • All 35 unit tests passing in ToDoListViewModelTest

🤖 Generated with Claude Code

Co-Authored-By: Claude [email protected]

refs: MBL-19400
affects: Student
release note: Added swipe-to-complete and checkbox toggle functionality to To Do List with undo support

Checklist

  • Follow-up e2e test ticket created or not needed
  • Tested in dark mode
  • Tested in light mode
  • Test in landscape mode and/or tablet
  • A11y checked
  • Approve from product

- Apply ease-in cubic easing to swipe indicator fade-in for more natural animation
- Add GESTURE_START haptic feedback when user begins dragging
- Add GESTURE_END haptic feedback when swipe animation completes
- Keep TOGGLE_ON/OFF for checkbox interactions
- All haptics fall back to CONTEXT_CLICK on API < 34
- Provides better tactile feedback flow: start → drag → end
- Created DefaultToDoListRouter with no-op implementations
- Added ToDoListRouter provider to Teacher ToDoModule
- Added ToDoListRouter provider to Parent ToDoModule
- Fixes build issues for Teacher and Parent apps since ToDoListFragment is in common code
@inst-danger
Copy link
Contributor

Parent Install Page

@inst-danger
Copy link
Contributor

Teacher Install Page

@inst-danger
Copy link
Contributor

Parent Install Page

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

📊 Code Coverage Report

✅ Student

  • PR Coverage: 43.82%
  • Master Coverage: 43.82%
  • Delta: +0.00%

✅ Teacher

  • PR Coverage: 25.58%
  • Master Coverage: 25.58%
  • Delta: +0.00%

✅ Pandautils

  • PR Coverage: 22.43%
  • Master Coverage: 22.39%
  • Delta: +0.04%

📈 Overall Average

  • PR Coverage: 30.61%
  • Master Coverage: 30.60%
  • Delta: +0.01%

@inst-danger
Copy link
Contributor

Teacher Install Page

@inst-danger
Copy link
Contributor

Student Install Page

@tamaskozmer tamaskozmer changed the title [MBL-19400][Student] To Do List - Implement actions (swipe, checkbox) #3356 [MBL-19400][Student] To Do List - Implement actions (swipe, checkbox) Nov 3, 2025
@inst-danger
Copy link
Contributor

Parent Install Page

@inst-danger
Copy link
Contributor

Teacher Install Page

@inst-danger
Copy link
Contributor

Student Install Page

@inst-danger
Copy link
Contributor

Parent Install Page

@inst-danger
Copy link
Contributor

Teacher Install Page

@inst-danger
Copy link
Contributor

Student Install Page

Copy link
Contributor

@kristofnemere kristofnemere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA+1

@inst-danger
Copy link
Contributor

Parent Install Page

@inst-danger
Copy link
Contributor

Teacher Install Page

@inst-danger
Copy link
Contributor

Student Install Page

@tamaskozmer tamaskozmer merged commit a349f01 into master Nov 6, 2025
23 of 26 checks passed
@tamaskozmer tamaskozmer deleted the MBL-19400-todo-actions branch November 6, 2025 11:22
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.

5 participants