Skip to content

Commit

Permalink
Account details update: made email & DoB mandatory and updated onboar…
Browse files Browse the repository at this point in the history
…ding texts (#5)

# *Name of the PR*

## ♻️ Current situation & Problem
*Modifying account detail configurations.*
*Responding to reviewer comment.*


## ⚙️ Release Notes 
*Modified localizable strings (onboarding texts) and made the strings
'automatic'*
*Removed commented code that I'm not implementing.*


## 📚 Documentation
*In-line documentation provided.*


## ✅ Testing
*N/A. All elements should be testable*


## 📝 Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/CS342/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/CS342/.github/blob/main/CONTRIBUTING.md):
- [ ] I agree to follow the [Code of
Conduct](https://github.com/CS342/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/CS342/.github/blob/main/CONTRIBUTING.md).
  • Loading branch information
EvelynBunnyDev authored Jan 24, 2024
1 parent 063b54d commit a340ac1
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 11 deletions.
17 changes: 12 additions & 5 deletions Behavior/Account/AccountSetupHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,23 @@ struct AccountSetupHeader: View {
var body: some View {
VStack {
Text("ACCOUNT_TITLE")
.font(.largeTitle)
.bold()
.padding(.bottom)
.padding(.top, 30)
.font(.largeTitle)
.bold()
.padding(.bottom)
.padding(.top, 30)

Text("ACCOUNT_SUBTITLE")
.padding(.bottom, 8)
Divider()
if account.signedIn, case .generic = setupState {
Text("ACCOUNT_SIGNED_IN_DESCRIPTION")
.padding()
} else {
Text("ACCOUNT_SETUP_DESCRIPTION")
VStack {
Text("ACCOUNT_SETUP_DESCRIPTION")
Text("ACCOUNT_REQUIRED_ITEMS")
}
.padding()
}
}
.multilineTextAlignment(.center)
Expand Down
2 changes: 1 addition & 1 deletion Behavior/Account/AccountSheet.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// This source file is part of the Behavior based on the Stanford Spezi Template Application project
// This source file is part of the Stanford Spezi Template Application open-source project
//
// SPDX-FileCopyrightText: 2023 Stanford University
//
Expand Down
6 changes: 4 additions & 2 deletions Behavior/BehaviorDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ class BehaviorDelegate: SpeziAppDelegate {
AccountConfiguration(configuration: [
.requires(\.userId),
.requires(\.name),
.collects(\.genderIdentity),
.collects(\.dateOfBirth)
.requires(\.dateOfBirth),

// additional values stored using the `FirestoreAccountStorage` within our Standard implementation
.collects(\.genderIdentity)
])

if FeatureFlags.useFirebaseEmulator {
Expand Down
17 changes: 14 additions & 3 deletions Behavior/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,23 @@
}
}
},
"ACCOUNT_REQUIRED_ITEMS" : {
"extractionState" : "automatic",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Email, Name, and Date of Birth are required."
}
}
}
},
"ACCOUNT_SETUP_DESCRIPTION" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "You may login to your existing account. Or create a new one if you don't have one already."
"value" : "Login to your existing account, or create one if you are new! "
}
}
}
Expand All @@ -26,7 +37,7 @@
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "You are already logged in with the account shown below. Continue or change your account by logging out."
"value" : "You are logged in!"
}
}
}
Expand Down Expand Up @@ -521,4 +532,4 @@
}
},
"version" : "1.0"
}
}

0 comments on commit a340ac1

Please sign in to comment.