Data Privacy Content Optionality
Hey! :) This PR adds:
- Optionality for dataPrivacyContent in BottomSection (and subsequently WelcomeScreen, and all view modifiers)
- The close button for the data privacy sheet will now use the iOS 26
.closebutton role if applicable.
I figured adding some extra flexibility with the data privacy message would be helpful, as not all apps may be collecting metrics or they simply may not want to display that information in this way.
Hopefully this matches with the goals of the project, looking forward to feedback :)
Thanks for the ideas and taking the time to look into this!
I think it makes sense to have this be optional or configurable, but now I'm wondering if we should change the approach for how we handle creating/configuring the Welcome Screen & how we handle presentation.
I'm not really sure if this was what you had in mind, but I had drafted up an approach that would use a modifier to give some further flexibility in the actually presentation of privacy text altogether.
.privacyNoticeText { showSheet in
HStack {
Image(systemName: "lock.fill")
Text("All your data is stored on device")
Button("See more") {
showSheet()
}
.fontWeight(.bold)
}
}
If applied, the content included would replace the current text + icon. Additionally, it would still be able to utilize the same data privacy content sheet. I think this would be a logical in between for the data privacy content optionality, by just providing as a modification to existing content, without just removing it altogether (but still having the option to!).
I wasn't sure the direction you were thinking, but I figured this could be an option to prevent any major changes to initializers/settings. I have a functioning version that needs some cleanup, but I wanted your thoughts before I finalized anything.
I would love to see this PR completed and merged in as I don't collect any data and would like to update the onboarding screen to remove this.
Decided to make another welcome screen for apps that don't collect data (in 2.2.0)