StanfordSpezi / SpeziOnboarding

Spezi Onboarding module to inform a user or retrieve consent for a study participation
https://swiftpackageindex.com/StanfordSpezi/SpeziOnboarding/documentation/
MIT License
11 stars 5 forks source link

Enable content adjustment in upcoming OnboardingStack steps #44

Closed philippzagar closed 2 months ago

philippzagar commented 3 months ago

Problem

Currently, the OnboardingStack is designed to allow modifications to its views (i.e., the order and content of the OnboardingStack) only before any navigation operation has occurred. This restriction is in place to simplify the management of changes within the OnboardingStack. Without this limitation, attempts to navigate backwards or dismiss the currently displayed onboarding step (for example, after receiving HealthKit authorizations) could lead to unintended behavior.

Solution

The OnboardingStack should be adjusted to permit changes to its Views only for those that are upcoming in the navigation flow, specifically views that are ahead of the current onboarding step. This approach mitigates the restrictions of the OnboardingStack, facilitating easier management of navigation steps while still maintaining straightforward bookkeeping for navigation step management.

Additional context

No response

Code of Conduct