Skip to content
This repository was archived by the owner on May 26, 2026. It is now read-only.

Introduce DmfsTaskFieldHandler and DmfsTaskPropertytHandler + three first handlers#401

Merged
sunkup merged 1 commit into
mainfrom
341-dmfstask-introduce-dmfstaskfieldhandler-interface-first-handler-classes
May 20, 2026
Merged

Introduce DmfsTaskFieldHandler and DmfsTaskPropertytHandler + three first handlers#401
sunkup merged 1 commit into
mainfrom
341-dmfstask-introduce-dmfstaskfieldhandler-interface-first-handler-classes

Conversation

@sunkup
Copy link
Copy Markdown
Member

@sunkup sunkup commented May 19, 2026

  • Introduce DmfsTaskFieldHandler and DmfsTaskPropertytHandler
  • Extract task title and UID field handlers
  • extract alarms property handler

@sunkup sunkup force-pushed the 341-dmfstask-introduce-dmfstaskfieldhandler-interface-first-handler-classes branch from 7f74070 to 1528009 Compare May 19, 2026 09:12
@sunkup sunkup requested a review from Copilot May 19, 2026 09:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors DmfsTaskProcessor by introducing two handler interfaces (DmfsTaskFieldHandler for main task row fields and DmfsTaskPropertyHandler for property sub-rows) and extracting the first three handlers (UID, Title, Alarms) into separate classes with unit tests. This is a structural refactor to support better separation of concerns and testability of the task mapping logic.

Changes:

  • Add DmfsTaskFieldHandler and DmfsTaskPropertyHandler interfaces
  • Extract UidHandler, TitleHandler, and AlarmsHandler from inline logic in DmfsTaskProcessor
  • Add Robolectric-based unit tests for each new handler

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/DmfsTaskFieldHandler.kt New interface for mapping fields from a task row into a Task
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/DmfsTaskPropertyHandler.kt New interface for mapping property sub-rows into a Task
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/UidHandler.kt Extracted UID mapping
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/TitleHandler.kt Extracted title/summary mapping
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/handler/AlarmsHandler.kt Extracted alarm property mapping
lib/src/main/kotlin/at/bitfire/synctools/mapping/tasks/DmfsTaskProcessor.kt Wires the new handler abstractions and removes inline logic
lib/src/test/kotlin/.../UidHandlerTest.kt Tests for UidHandler
lib/src/test/kotlin/.../TitleHandlerTest.kt Tests for TitleHandler
lib/src/test/kotlin/.../AlarmsHandlerTest.kt Tests for AlarmsHandler

@sunkup sunkup self-assigned this May 19, 2026
@sunkup sunkup added the refactoring Quality improvement of existing functions label May 19, 2026
@sunkup sunkup requested a review from rfc2822 May 19, 2026 09:16
@sunkup sunkup marked this pull request as ready for review May 19, 2026 09:16
@sunkup sunkup force-pushed the 341-dmfstask-introduce-dmfstaskfieldhandler-interface-first-handler-classes branch from 1528009 to adaa120 Compare May 19, 2026 10:31
@sunkup sunkup merged commit c21a72f into main May 20, 2026
9 checks passed
@sunkup sunkup deleted the 341-dmfstask-introduce-dmfstaskfieldhandler-interface-first-handler-classes branch May 20, 2026 08:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

refactoring Quality improvement of existing functions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DmfsTask: introduce DmfsTaskFieldHandler interface + first handler classes

3 participants