Skip to content

Commit

Permalink
Add background to education video cards. (#82)
Browse files Browse the repository at this point in the history
# Add background to education video cards.

## ♻️ Current situation & Problem
Right now, there is no background behind each video section. This is
stylistically inconsistent with the rest of the app, which uses
inset-grouped style lists.

## ⚙️ Release Notes 
- Added a background to the educational video sections to match the rest
of the app.
- Added negative padding to align the section headers in the Heart
Health view with the leading edge of the section content.
- Slightly decreased the opacity of the gauge in medications to make it
a softer color.

The education video section now looks like this:

| Expanded | Collapsed |
| ---------- | ---------- |
| <img
src=https://github.com/user-attachments/assets/545ac21d-4557-4ddb-bb3a-42e7ca0cd997\>
| <img
src=https://github.com/user-attachments/assets/2059934d-ed0c-4376-931d-5e7657c92581\>


## 📚 Documentation
NA


## ✅ Testing
NA - no testing-warranted changes made.


### Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md):
- [X] I agree to follow the [Code of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md).

---------

Co-authored-by: Paul Schmiedmayer <[email protected]>
  • Loading branch information
nriedman and PSchmiedmayer authored Aug 30, 2024
1 parent ee1332c commit 7c1ff46
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
{
"identity" : "fhirmodels",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/FHIRModels",
"location" : "https://github.com/apple/FHIRModels.git",
"state" : {
"revision" : "861afd5816a98d38f86220eab2f812d76cad84a0",
"version" : "0.5.0"
Expand Down Expand Up @@ -186,17 +186,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/Spezi",
"state" : {
"revision" : "f1f6fb4d275d5685b612ef84bf847f9740fed47f",
"version" : "1.7.3"
"revision" : "d5c8eec55255fd753367422c49db1ec16610c48b",
"version" : "1.7.4"
}
},
{
"identity" : "speziaccount",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziAccount.git",
"state" : {
"revision" : "40fa3f5e84d22c700ad152e1a29f459cc5e41447",
"version" : "2.0.0-beta.4"
"revision" : "6b1603d2dd95b1787cfb0cbdce32a4b4bebb79ae",
"version" : "2.0.0-beta.5"
}
},
{
Expand Down Expand Up @@ -231,8 +231,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziFirebase.git",
"state" : {
"revision" : "7855a911c7309bf34d3cb693f76989ede15737fc",
"version" : "2.0.0-beta.1"
"revision" : "12e7b779a3339737ea100b4eb7491072d4e83cd5",
"version" : "2.0.0-beta.2"
}
},
{
Expand Down Expand Up @@ -267,26 +267,26 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziNetworking",
"state" : {
"revision" : "b01333fbe46bc02445cc06a1d721bc490d77d95e",
"version" : "2.1.2"
"revision" : "26f1ed49e1916ae4fdc1bd033127a873a9e6dd0a",
"version" : "2.1.3"
}
},
{
"identity" : "spezionboarding",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziOnboarding",
"state" : {
"revision" : "ec570fe5b26bd80a0ee7bc047ae680767621aaa4",
"version" : "1.2.1"
"revision" : "a3d7bc15e6803b2205eb8dca010a48b1a40215be",
"version" : "1.2.2"
}
},
{
"identity" : "speziquestionnaire",
"kind" : "remoteSourceControl",
"location" : "https://github.com/StanfordSpezi/SpeziQuestionnaire.git",
"state" : {
"revision" : "853585fbdd5d2d0af440c805d629a025ef5545d9",
"version" : "1.2.2"
"revision" : "d0bd55f8a0bd3eeb806a673261e9d6b9fd43f3cd",
"version" : "1.2.3"
}
},
{
Expand Down Expand Up @@ -357,8 +357,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "564597ad2fe2513a94dd8f3ba27ea2ff4be3cb37",
"version" : "1.28.0"
"revision" : "edb6ed4919f7756157fe02f2552b7e3850a538e5",
"version" : "1.28.1"
}
},
{
Expand Down
12 changes: 7 additions & 5 deletions ENGAGEHF/Education/VideoList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ struct VideoList: View {
ScrollView {
LazyVStack(spacing: 12) {
ForEach(videoCollections.sorted(by: { $0.orderIndex < $1.orderIndex })) { videoCollection in
VideoListSection(
title: videoCollection.title,
subtitle: videoCollection.description,
videos: videoCollection.videos
)
StudyApplicationListCard {
VideoListSection(
title: videoCollection.title,
subtitle: videoCollection.description,
videos: videoCollection.videos
)
}
.accessibilityIdentifier("Video Section: \(videoCollection.title)")
}
}
Expand Down
1 change: 1 addition & 0 deletions ENGAGEHF/HeartHealth/Shared/DescriptionSection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ struct DescriptionSection: View {
header: {
Text("About \(quantityName)")
.font(.title3.bold())
.padding(.leading, -16)
}
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ struct MeasurementListSection: View {
},
header: {
MeasurementListHeader(for: type)
.padding(.horizontal, -16)
}
)
.viewStateAlert(state: $viewState)
Expand Down
1 change: 1 addition & 0 deletions ENGAGEHF/HeartHealth/Symptoms/SymptomsGraphSection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ struct SymptomsGraphSection: View {
header: {
SymptomsPicker(symptomsType: $symptomsType)
.padding(.vertical, 5)
.padding(.leading, -16)
}
)
}
Expand Down
1 change: 1 addition & 0 deletions ENGAGEHF/HeartHealth/Vitals/ResolutionPicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ struct ResolutionPicker: View {
Text(resolution.description)
}
}
.padding(.horizontal, -12)
}
}

Expand Down
1 change: 1 addition & 0 deletions ENGAGEHF/HeartHealth/Vitals/VitalsGraphSection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ struct VitalsGraphSection: View {
Spacer()
ResolutionPicker(selection: $granularity)
}
.padding(.horizontal, -16)
}
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ struct CapsuleStack: View {
.frame(width: progress * geometry.size.width)
.foregroundStyle(.accent)
}
.opacity(0.8)
}
.frame(height: gaugeHeight)
}
Expand Down

0 comments on commit 7c1ff46

Please sign in to comment.