Skip to content

Conversation

@vargaat
Copy link
Collaborator

@vargaat vargaat commented Oct 22, 2025

What's new?

  • Added mark-as-done functionality to the Todo list, allowing users to mark todo items as complete via checkbox or swipe gesture.
  • For the swipe gesture I checked our existing solution in the codebase but that doesn't support the full swipe functionality. I checked two 3rd parties, but I wasn't satisfied with them either, so I created a new implementation that only supports the full swipe gesture.
    • There were multiple challenges during implementation, most of them came from the fact that our gesture recognizer has no connection with other gesture recognizers on the screen (scroll view's pull to refresh gesture and the cell button's tap gestures). After a lot of trial and errors, the best was to use tap gestures instead of buttons, this solved the issue of the button and the checkbox triggering during swipe (but we've lost the highlight on slow taps). The other thing was to prevent the vertical scrollview scrolling while swiping horizontally, which was achieved by a binding that disables the scrollview's scrolling ability while the horizontal swipe is in progress.

There will be further changes to this screen in the epic, so E2E tests will be written when the screen takes its final form.

refs: MBL-19374
builds: Student
affects: Student
release note: Added mark-as-done feature to new To-do screen.
test plan: See ticket.

Screenshots

Happy FlowFailure
ScreenRecording_10-22-2025.10.MP4
ScreenRecording_10-22-2025.9.MP4

Checklist

  • A11y checked
  • Tested on phone
  • Tested on tablet
  • Tested in dark mode
  • Tested in light mode

vargaat and others added 30 commits September 26, 2025 15:16
refs: MBL-19373
builds: Student
affects: Student
release note: none

test plan:
- Compare design with figma.
- Check accessibility.
- Validate proper grouping by dates.
# Conflicts:
#	Core/CoreTests/Features/Todos/Model/TodoInteractorLiveTests.swift
vargaat and others added 20 commits October 16, 2025 09:29
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Move API logic from view model to TodoInteractor
- Inject router dependency into TodoListViewModel
- Prevent multiple taps from firing duplicate API requests
- Update todo badge counter when marking items done/undone
- Add comprehensive unit tests for new behavior

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
refs: MBL-19374
builds: Student
affects: Student
release note: Added mark-as-done feature to new To-do screen.

test plan: See ticket.

Co-Authored-By: Claude <[email protected]>
@vargaat vargaat self-assigned this Oct 22, 2025
@inst-danger
Copy link
Contributor

inst-danger commented Oct 22, 2025

Warnings
⚠️ One or more files are below the minimum test coverage 50%
⚠️ The total test coverage is below the minimum 90%

Release Note:

Added mark-as-done feature to new To-do screen.

Affected Apps: Student

Builds: Student

MBL-19374

Coverage New % Master % Delta
Canvas iOS 80.38% 80.31% 0.07%
Horizon/Horizon/Sources/Features/Notebook/Common/View/HighlightWebView/HighlightWebFeature.swift 0% 0% 0%
Horizon/Horizon/Sources/Features/Notebook/Common/View/HighlightWebView/EnableZoom.swift 0% 0% 0%
Horizon/Horizon/Sources/Common/Domain/GetCoursesInteractor.swift 38.16% 38.16% 0%
Horizon/Horizon/Sources/Features/LearningObjects/Assignment/SubmissionComment/Data/CommentAttachment.swift 0% 0% 0%
Horizon/Horizon/Sources/Features/Account/Notifications/Domain/NotificationSettingsInteractor.swift 0% 0% 0%
Horizon/Horizon/Sources/Common/Utilities/Double+.swift 0% 0% 0%
Horizon/Horizon/Sources/Common/Data/HModuleStatus.swift 0% 0% 0%
Horizon/Horizon/Sources/Features/Session/SessionInteractor.swift 33.33% 33.33% 0%
Horizon/Horizon/Sources/Features/Assist/AssistFlashCard/View/AssistFlashCardViewModel.swift 0% 0% 0%
Horizon/Horizon/Sources/Features/LearningObjects/Assignment/AssignmentDetails/View/AssignmentSubmissionType.swift 0% 0% 0%

Generated by 🚫 dangerJS against f083389

vargaat and others added 2 commits October 22, 2025 11:12
- Extract cancelDelayedRemove helper to properly cancel and remove timers
- Fix UpdatePlannerOverrideRequest to return APIPlannerOverride instead of APINoContent
- Remove debug-only .make() usage from production code in MarkPlannableItemDone
- Simplify API request handling to use actual responses
- Update test mocks to return proper APIPlannerOverride objects
- Add MARK comments for better code organization

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@inst-danger
Copy link
Contributor

Builds

Commit: Remove unnecessary HStack and public modifiers. Add preview for swipe to remove. (f083389)
Build Number: 624
Built At: Oct 22 12:13 CEST (10/22 04:13 AM MDT)

Student

@vargaat vargaat requested a review from balintbartok October 22, 2025 11:52
Copy link
Contributor

@suhaibabsi-inst suhaibabsi-inst left a comment

Choose a reason for hiding this comment

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

Code +1


private struct SwipeToRemoveModifier<Label: View>: ViewModifier {
let backgroundColor: Color
let isSwiping: Binding<Bool>?
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not using @Binding var isSwiping: Bool ?

let onTap: (_ item: TodoItemViewModel, _ viewController: WeakViewController) -> Void
let onMarkAsDone: (_ item: TodoItemViewModel) -> Void
let onSwipeMarkAsDone: (_ item: TodoItemViewModel) -> Void
let isSwiping: Binding<Bool>?
Copy link
Contributor

Choose a reason for hiding this comment

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

Here as well. Why not use @Binding ?

Copy link
Contributor

@suhaibabsi-inst suhaibabsi-inst left a comment

Choose a reason for hiding this comment

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

Tested on iPhone XS, iOS 18.3.1.

✅ QA +1 for the most of UI features mentioned.

One minor issue:
Checkbox doesn't fade in-out as we swipe cell as mentioned in Figma file.

See record below:

ScreenRecording_10-28-2025.12-59-00_1.MP4

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.

4 participants