-
Notifications
You must be signed in to change notification settings - Fork 0
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 Discussions #90
base: 2U/develop
Are you sure you want to change the base?
Changes from 6 commits
b7aa63d
8ab02e7
3963976
97b5bf8
41ac553
4eb530e
9adc49d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,9 +46,8 @@ public struct ParentCommentView: View { | |
KFImage(URL(string: comments.authorAvatar)) | ||
.onFailureImage(KFCrossPlatformImage(systemName: "person")) | ||
.resizable() | ||
.background(Color.gray) | ||
.frame(width: 48, height: 48) | ||
.cornerRadius(isThread ? 8 : 24) | ||
.cornerRadius(24) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess so because this is the only place where the user avatar isn't circular. So after this change, the user avatar will be consistent across the app. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hello @marcotuts and @sdaitzman. Could you please confirm that this almost square avatar is not a design feature and should be the same throughout the app? Thank you There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to me the avatar being square and circle is a design inconsistency. It should either be circle everywhere or square everywhere. For 2U we have a circular approach to icons and buttons. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with you. Just need confirmation we shouldn't add theming here. |
||
}) | ||
VStack(alignment: .leading) { | ||
Text(comments.authorName) | ||
|
@@ -65,6 +64,7 @@ public struct ParentCommentView: View { | |
onFollowTap() | ||
}, label: { | ||
Image(systemName: comments.followed ? "star.fill" : "star") | ||
.renderingMode(.template) | ||
Text(comments.followed | ||
? DiscussionLocalization.Comment.unfollow | ||
: DiscussionLocalization.Comment.follow) | ||
|
@@ -108,29 +108,31 @@ public struct ParentCommentView: View { | |
}, label: { | ||
comments.voted | ||
? (CoreAssets.voted.swiftUIImage.renderingMode(.template)) | ||
: (CoreAssets.vote.swiftUIImage.renderingMode(.template)) | ||
: CoreAssets.vote.swiftUIImage.renderingMode(.template) | ||
|
||
Text("\(comments.votesCount)") | ||
.foregroundColor(Theme.Colors.textPrimary) | ||
Text(DiscussionLocalization.votesCount(comments.votesCount)) | ||
.font(Theme.Fonts.labelLarge) | ||
.foregroundColor(Theme.Colors.textPrimary) | ||
|
||
}).foregroundColor(comments.voted | ||
? Theme.Colors.accentXColor | ||
? Theme.Colors.accentColor | ||
: Theme.Colors.textSecondaryLight) | ||
Spacer() | ||
Button(action: { | ||
onReportTap() | ||
}, label: { | ||
comments.abuseFlagged | ||
let icon = comments.abuseFlagged | ||
? CoreAssets.reported.swiftUIImage | ||
: CoreAssets.report.swiftUIImage | ||
icon.renderingMode(.template) | ||
|
||
Text(comments.abuseFlagged | ||
? DiscussionLocalization.Comment.unreport | ||
: DiscussionLocalization.Comment.report) | ||
}) | ||
} | ||
.accentColor(comments.abuseFlagged | ||
? Theme.Colors.alert | ||
? Theme.Colors.irreversibleAlert | ||
: Theme.Colors.textSecondaryLight) | ||
.font(Theme.Fonts.labelLarge) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vertical Whitespace Violation: Limit vertical whitespace to a single empty line; currently 2 (vertical_whitespace)