Skip to content

Conversation

@mmertsock
Copy link
Member

@mmertsock mmertsock commented Mar 7, 2025

Adds an optional ORK1TaskViewControllerDelegate method to customize the "End Task"/"Discard Results" prompts shown when exiting a survey. In support of https://github.com/CareEvolution/MyDataHelps-iOS/pull/1399

Note that this was only needed for ORK1Kit, not ResearchKit v2, since these are used by the special TaskManager workflows that only use ORK1Kit. Actual ResearchKit surveys, for example, use other task delegates (e.g. RK1SurveyTaskInteraction) that already have their own taskViewControllerShouldConfirmCancel logic, and we don't currently have any requests to customize the button text for their end-task prompts.

Testing

This is a dependency for https://github.com/CareEvolution/MyDataHelps-iOS/pull/1399 and all testing would be performed as part of that PR.

@mmertsock mmertsock requested a review from eschramm March 7, 2025 17:56
Copy link

@eschramm eschramm left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@mmertsock
Copy link
Member Author

Refactored this with a cleaner design: declared a @protocol with (all optional) properties for the various customizable button labels. This allows us to have just a single new (also optional) ORK1TaskViewControllerDelegate method that returns an object conforming to that protocol. Ready for re-review.

@mmertsock mmertsock requested a review from eschramm March 11, 2025 13:36
@eschramm
Copy link

Changes look nice - I like this approach 🚢

@mmertsock mmertsock merged commit 1b7f355 into CEVRelease-2.x Mar 11, 2025
1 check passed
@mmertsock mmertsock deleted the mmertsock/customizable-prompts branch March 11, 2025 15:07
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.

2 participants