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

chore: Elm theme improvement on course home #86

Merged
merged 3 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Core/Core/View/Base/DownloadView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public struct DownloadAvailableView: View {
CoreAssets.startDownloading.swiftUIImage.renderingMode(.template)
.resizable()
.scaledToFit()
.foregroundColor(Theme.Colors.textPrimary)
.frame(width: 24, height: 24)
}
.frame(width: 30, height: 30)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public struct CourseProgressView: View {
ZStack(alignment: .leading) {
GeometryReader { geometry in
RoundedRectangle(cornerRadius: 10)
.fill(Theme.Colors.textSecondary.opacity(0.5))
.fill(Theme.Colors.courseProgressBG)
.frame(width: geometry.size.width, height: 10)

if let total = progress.totalAssignmentsCount,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ struct CustomDisclosureGroup: View {
.rotationEffect(.degrees(expandedSections[chapter.id] ?? false ? -90 : 90))
.foregroundColor(Theme.Colors.textPrimary)
if chapter.childs.allSatisfy({ $0.completion == 1 }) {
CoreAssets.finishedSequence.swiftUIImage
CoreAssets.finishedSequence.swiftUIImage.renderingMode(.template)
.foregroundColor(Theme.Colors.success)
}
Text(chapter.displayName)
.font(Theme.Fonts.titleMedium)
Expand Down Expand Up @@ -126,8 +127,9 @@ struct CustomDisclosureGroup: View {
VStack(alignment: .leading) {
HStack {
if sequential.completion == 1 {
CoreAssets.finishedSequence.swiftUIImage
CoreAssets.finishedSequence.swiftUIImage.renderingMode(.template)

Choose a reason for hiding this comment

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

Is there a way to prevent this warning while following the specified guidelines?
Line Length Violation: Line should be 120 characters or less; currently it has 125 characters

Copy link
Author

Choose a reason for hiding this comment

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

Unfortunately, didn't get a way to break it into multiple lines.

.resizable()
.foregroundColor(Theme.Colors.success)
.frame(width: 20, height: 20)
} else {
sequential.type.image
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.500",
"blue" : "0.733",
"green" : "0.647",
"red" : "0.592"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.500",
"blue" : "0.624",
"green" : "0.533",
"red" : "0.475"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
1 change: 1 addition & 0 deletions Theme/Theme/SwiftGen/ThemeAssets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public enum ThemeAssets {
public static let pastDueTimelineColor = ColorAsset(name: "pastDueTimelineColor")
public static let primaryHeaderColor = ColorAsset(name: "primaryHeaderColor")
public static let secondaryHeaderColor = ColorAsset(name: "secondaryHeaderColor")
public static let courseProgressBG = ColorAsset(name: "CourseProgressBG")
public static let deleteAccountBG = ColorAsset(name: "DeleteAccountBG")
public static let infoColor = ColorAsset(name: "InfoColor")
public static let irreversibleAlert = ColorAsset(name: "IrreversibleAlert")
Expand Down
1 change: 1 addition & 0 deletions Theme/Theme/Theme.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public struct Theme {
public private(set) static var courseCardShadow = ThemeAssets.courseCardShadow.swiftUIColor
public private(set) static var courseCardBackground = ThemeAssets.courseCardBackground.swiftUIColor
public private(set) static var deleteAccountBG = ThemeAssets.deleteAccountBG.swiftUIColor
public private(set) static var courseProgressBG = ThemeAssets.courseProgressBG.swiftUIColor

public static func update(
accentColor: Color = ThemeAssets.accentColor.swiftUIColor,
Expand Down
Loading