Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Spezi documentation #68

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
8 changes: 7 additions & 1 deletion TemplateApplication/Contacts/Contacts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ import SpeziContact
import SwiftUI


/// Displays the contacts for the Spezi Template Application.
/// Display contacts for your app.
///
/// Modify the contact details for your app in the Contacts view.
///
/// [Spezi Contact GitHub](https://github.com/StanfordSpezi/SpeziContact)
///
/// ![A screenshot of the Contact screen](Contacts)
struct Contacts: View {
let contacts = [
Contact(
Expand Down
1 change: 1 addition & 0 deletions TemplateApplication/Contacts/File.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[GitHub](https://github.com/StanfordSpezi/SpeziContact)
8 changes: 8 additions & 0 deletions TemplateApplication/Onboarding/Consent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ import SpeziOnboarding
import SwiftUI


/// Enable consent for your app.
///
/// The Consent view allows users to sign a custom markdown ConsentDocument for your app.
///
/// - Note: The `OnboardingConsentView` exports the signed consent form as PDF to the Spezi `Standard`, necessitating the conformance of the `Standard` to the `OnboardingConstraint`.
///
/// [Spezi Onboarding GitHub](https://github.com/StanfordSpezi/SpeziOnboarding)
///
/// ![A screenshot of the Consent screen](Consent)
struct Consent: View {
@Environment(OnboardingNavigationPath.self) private var onboardingNavigationPath

Expand Down
8 changes: 8 additions & 0 deletions TemplateApplication/Onboarding/HealthKitPermissions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ import SpeziOnboarding
import SwiftUI


/// Gain access to HealthKit data.
///
/// Customize the HealthKitPermissions view to specify your app's usage of HealthKit data to the user.
///
/// [Spezi Onboarding GitHub](https://github.com/StanfordSpezi/SpeziOnboarding)
///
/// ![A screenshot of the HealthKitPermissions screen](HealthKitAccess)
/// ![A screenshot of the HealthKitSheet screen](HealthKitSheet)
Comment on lines +20 to +21
Copy link
Member

Choose a reason for hiding this comment

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

The screenshots are currently shown in a really large size; it might not be the desirable size. I would suggest that we use a trick of having a @Row with a size of e.g., 3 columns that only contains one or two and therefore scales the images accordingly.

Suggested change
/// ![A screenshot of the HealthKitPermissions screen](HealthKitAccess)
/// ![A screenshot of the HealthKitSheet screen](HealthKitSheet)
/// @Row(numberOfColumns: 3) {
/// @Column(size: 1) {
/// @Image(source: "HealthKitAccess", alt: "HealthKit Onboarding Flow")
/// }
/// @Column(size: 1) {
/// @Image(source: "HealthKitSheet", alt: "Permissions screen of the HealthKit framework")
/// }
/// }

Applies to other parts of the documentation as well.

struct HealthKitPermissions: View {
@Environment(HealthKit.self) private var healthKitDataSource
@Environment(OnboardingNavigationPath.self) private var onboardingNavigationPath
Expand Down
7 changes: 7 additions & 0 deletions TemplateApplication/Onboarding/InterestingModules.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ import SpeziOnboarding
import SwiftUI


/// Feature the core components of your app.
///
/// Use the InterestingModules view to highlight the Spezi modules used to achieve your app's core functionality.
///
/// [Spezi Onboarding GitHub](https://github.com/StanfordSpezi/SpeziOnboarding)
///
/// ![A screenshot of the InterestingModules screen](InterestingModules)
struct InterestingModules: View {
@Environment(OnboardingNavigationPath.self) private var onboardingNavigationPath

Expand Down
8 changes: 7 additions & 1 deletion TemplateApplication/Onboarding/Welcome.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@ import SpeziOnboarding
import SwiftUI


/// Introduction to your app's features during onboarding.
///
/// The Welcome view can provide first time users with important information about your app.
///
/// [Spezi Onboarding GitHub](https://github.com/StanfordSpezi/SpeziOnboarding)
///
/// ![A screenshot of the Welcome screen](Welcome)
struct Welcome: View {
@Environment(OnboardingNavigationPath.self) private var onboardingNavigationPath


var body: some View {
OnboardingView(
title: "Spezi Template Application",
Expand Down
7 changes: 7 additions & 0 deletions TemplateApplication/Schedule/ScheduleView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ import SpeziViews
import SwiftUI


/// Schedule questionnaires in your app.
///
/// Modify your schedule and path to your JSON questionnaire in the ``TemplateApplicationScheduler``. These changes will be reflected in the ScheduleView.
///
/// [Spezi Scheduler GitHub](https://github.com/StanfordSpezi/SpeziScheduler)
///
/// ![A screenshot of the Schedule screen](Schedule)
struct ScheduleView: View {
@Environment(Account.self) private var account: Account?
@Environment(TemplateApplicationScheduler.self) private var scheduler: TemplateApplicationScheduler
Expand Down
Copy link
Member

Choose a reason for hiding this comment

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

Thank you for all the improvements here, looks nice!

It would be amazing if every view linked here has a proper documentation description similar to the ones in the other views. We should ensure that clicking on a link would show some more hints and suggestions.

Original file line number Diff line number Diff line change
Expand Up @@ -18,73 +18,73 @@

> Tip: Do you want to try out the Spezi Template Application? You can download it to your iOS device using [TestFlight](https://testflight.apple.com/join/ipEezBY1)!

The following screenshots show a wide variety of features based on Spezi Modules that are part of the Spezi Template Application.
The following screenshots show a wide variety of features based on Spezi Modules that are part of the Spezi Template Application. Click on the links below the screenshots to learn more about the specific Spezi module.

@Row(numberOfColumns: 3) {
@Column(size: 1) {
@Image(source: "Welcome", alt: "A screen displaying welcome information.") {
Welcome View.
[Welcome View](https://spezi.health/SpeziTemplateApplication/documentation/templateapplication/welcome)
}
}
@Column(size: 1) {
@Image(source: "InterestingModules", alt: "A screen showing an overview of the modules used in the Spezi Template Application.") {
Interesting Modules
[Interesting Modules](https://spezi.health/SpeziTemplateApplication/documentation/templateapplication/interestingmodules)
}
}
@Column(size: 1) {
@Image(source: "Consent", alt: "A screen displaying the consent view.") {
Consent Signature.
[Consent Signature](https://spezi.health/SpeziTemplateApplication/documentation/templateapplication/consent)
}
}
}
@Row(numberOfColumns: 3) {
@Column(size: 1) {
@Image(source: "HealthKitAccess", alt: "HealthKit Onboarding Flow") {
HealthKit Access.
[HealthKit Access](https://spezi.health/SpeziTemplateApplication/documentation/templateapplication/healthkitpermissions)
}
}
@Column(size: 1) {
@Image(source: "HealthKitSheet", alt: "Permissions screen of the HealthKit framework") {
Granular HealthKit Share Control.
[Granular HealthKit Share Control](https://spezi.health/SpeziTemplateApplication/documentation/templateapplication/healthkitpermissions)
}
}
@Column(size: 1) {
@Image(source: "Notifications", alt: "Onboarding screen showing the Notifications permission screen.") {
Trigger Local Notifications.
@Image(source: "Schedule", alt: "A screen displaying the Scheduler UI.") {
[Schedule Tasks](https://spezi.health/SpeziTemplateApplication/documentation/templateapplication/scheduleview)
}
}
}
@Row(numberOfColumns: 3) {
@Column(size: 1) {
@Image(source: "Schedule", alt: "A screen displaying the Scheduler UI.") {
Schedule Tasks.
@Image(source: "Notifications", alt: "Onboarding screen showing the Notifications permission screen.") {
[Trigger Local Notifications](https://spezi.health/SpeziTemplateApplication/documentation/templateapplication/notificationpermissions)
}
}
@Column(size: 1) {
@Image(source: "Questionnaire", alt: "A screen showing a questionnaire using ResearchKit.") {
Display Questionnaires.
[Display Questionnaires](https://spezi.health/SpeziTemplateApplication/documentation/templateapplication/scheduleview)
}
}
@Column(size: 1) {
@Image(source: "ScheduleComplete", alt: "The scheduler screen showing the completed UI") {
Keep Track of Tasks.
[Keep Track of Tasks](https://spezi.health/SpeziTemplateApplication/documentation/templateapplication/scheduleview)
}
}
}
@Row(numberOfColumns: 3) {
@Column(size: 1) {
@Image(source: "Contacts", alt: "A screen displaying the Contact UI.") {
Contact Information.
[Contact Information](https://spezi.health/SpeziTemplateApplication/documentation/templateapplication/contacts)
}
}
@Column(size: 1) {
@Image(source: "Account", alt: "A screen displaying the current user account information.") {
Account Overview.
@Image(source: "License", alt: "License information to list all used Swift Packages") {
[License Information](https://spezi.health/SpeziTemplateApplication/documentation/templateapplication/licensetype)

Check failure on line 82 in TemplateApplication/Supporting Files/TemplateApplication.docc/TemplateApplication.md

View workflow job for this annotation

GitHub Actions / Markdown Link Check / Check Links

[Linkspector] reported by reviewdog 🐶 Cannot reach https://spezi.health/SpeziTemplateApplication/documentation/templateapplication/licensetype. Status: 404 Raw Output: message:"Cannot reach https://spezi.health/SpeziTemplateApplication/documentation/templateapplication/licensetype. Status: 404" location:{path:"TemplateApplication/Supporting Files/TemplateApplication.docc/TemplateApplication.md" range:{start:{line:82 column:13} end:{line:82 column:127}}} severity:ERROR source:{name:"linkspector" url:"https://github.com/UmbrellaDocs/linkspector"}
}
}
@Column(size: 1) {
@Image(source: "License", alt: "License information to list all used Swift Packages") {
License Information.
@Image(source: "Account", alt: "A screen displaying the current user account information.") {
Account Overview.
}
}
}
Expand Down
Loading