From ffe73cf163d0abe71ada16a6914655793a2d3649 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Mon, 9 May 2022 15:00:32 -0700 Subject: [PATCH] Tweaks on cell padding This adds line spacing for longer titles, pulls the author/site closer together and gives a little spacing before label chips if there are labels on a cell. --- .../Views/FeedItem/HomeFeedCardView.swift | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift b/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift index afb3f2916..96690b7f6 100644 --- a/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift +++ b/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift @@ -11,10 +11,11 @@ public struct FeedCard: View { public var body: some View { VStack { - HStack(alignment: .top, spacing: 6) { - VStack(alignment: .leading, spacing: 4) { + HStack(alignment: .top, spacing: 10) { + VStack(alignment: .leading, spacing: 1) { Text(item.unwrappedTitle) .font(.appCallout) + .lineSpacing(1.25) .foregroundColor(.appGrayTextContrast) .fixedSize(horizontal: false, vertical: true) @@ -64,19 +65,19 @@ public struct FeedCard: View { } } - // Category Labels - ScrollView(.horizontal, showsIndicators: false) { - HStack { - ForEach(item.sortedLabels, id: \.self) { - TextChip(feedItemLabel: $0) + if item.sortedLabels.count > 0 { + // Category Labels + ScrollView(.horizontal, showsIndicators: false) { + HStack { + ForEach(item.sortedLabels, id: \.self) { + TextChip(feedItemLabel: $0) + } + Spacer() } - Spacer() - } + }.padding(.top, 8) } - .padding(.top, 8) - .padding(.bottom, 2) } - .padding(.top, 16) + .padding(.top, 10) .padding(.bottom, 8) .frame( minWidth: nil,