Closed MarcSchlichting closed 3 weeks ago
Within #62 we have slightly tweaked how the FollowUpInfoSheet
is presented and added additional controls to fully customize the experience.
In general, we ask for follow-up information to cover two use cases:
collected
account keys again.This continues to be the default, making sure that we adapt to changes in the AccountValueConfiguration
and make sure to ask follow up question for signup providers that are not capable of showing all account keys upon signup. We still aim to not show collected
account keys more often than we can guarantee is required.
However, this behavior can now be customized. The following changes were made:
reportSignupProviderCompliance(_:)
preference.FollowUpBehavior
used by the AccountSetup
view can be customized using the followUpBehaviorAfterSetup(_:)
modifier. There are two new behaviors that can be chosen apart from the default:
disabled
: Completely disables automatic behavior and never asks for follow up information. Useful for a completely custom flow.redundant
: Implements the behavior presented in https://github.com/StanfordSpezi/SpeziAccount/pull/53#discussion_r1512079312, where collected
keys are always shown if there is at least one required
key missing (both for signup and logins).FollowUpInfoSheet
is now public API with more some options to customize its appearance.As discussed in the previous comment, the issue was resolved by adding greater flexibility for the Follow-Up Info sheet. Closing this as #62 got merged and release.
Follow Up Collected Information
:recycle: Current situation & Problem
In the default configuration, the date of birth and the gender identity are
.collected
, but not.required
. When the user uses the self signup method, they are presented with items from both categories. However, in some use cases, self-signup might not be the preferable way how users log into an application. In this case a provider can create an account for them (e.g. through Firebase). When the user logs in for the first time thedetails.isNewUser
is no longertrue
and only the.required
categories are displayed. In case an application allows for both self-signup and provider sign-up this leads to a difference in collected information about the user which is undesirable.:gear: Release Notes
.onChange
in theAccountSetup.swift
file to always collect the.collected
and.required
information.:books: Documentation
By setting the
includeCollected
argument of themissingRequiredKeys
always totrue
results that the user is always presented with the full follow up sheet, not just the truncated version. Note that by doing this, fields of the.collected
category still are not mandatory.:white_check_mark: Testing
The behavior was intensively tested with the TBI application developed as part of Stanford CS342 and no issues were found.
:pencil: Code of Conduct & Contributing Guidelines
By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: