From f50357d385134d1587fe114275d12ec2587b9b5c Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Thu, 5 May 2022 10:59:53 -0700 Subject: [PATCH 1/2] Add some padding and min cell height on the iOS list view --- .../Views/FeedItem/HomeFeedCardView.swift | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift b/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift index a38bebf6e..e7b90337f 100644 --- a/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift +++ b/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift @@ -12,12 +12,11 @@ public struct FeedCard: View { public var body: some View { VStack { HStack(alignment: .top, spacing: 6) { - VStack(alignment: .leading, spacing: 6) { + VStack(alignment: .leading, spacing: 2) { Text(item.unwrappedTitle) - .font(.appSubheadline) + .font(.appCallout) .foregroundColor(.appGrayTextContrast) - .lineLimit(2) - .frame(maxWidth: .infinity, alignment: .leading) + .fixedSize(horizontal: false, vertical: true) if let author = item.author { Text("By \(author)") @@ -34,7 +33,13 @@ public struct FeedCard: View { .lineLimit(1) } } - .frame(maxWidth: .infinity) + .frame( + minWidth: 0, + maxWidth: .infinity, + minHeight: 0, + maxHeight: .infinity, + alignment: .topLeading + ) .multilineTextAlignment(.leading) .padding(0) @@ -52,7 +57,7 @@ public struct FeedCard: View { .frame(width: 80, height: 80) .cornerRadius(6) } else { - EmptyView() + EmptyView().frame(width: 80, height: 80, alignment: .top) } } } @@ -68,8 +73,19 @@ public struct FeedCard: View { Spacer() } } - .padding(.bottom, 5) + .padding(.top, 2) + .padding(.bottom, 2) } - .padding(.top, 5) + .padding(.top, 16) + .padding(.bottom, 8) + .frame( + minWidth: nil, + idealWidth: nil, + maxWidth: nil, + minHeight: 70, + idealHeight: nil, + maxHeight: nil, + alignment: .topLeading + ) } } From 6995cc29dab513ce220108a70ca73204b9ae6c29 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Thu, 5 May 2022 11:45:39 -0700 Subject: [PATCH 2/2] Add a little more spacing between lines and before labels --- .../OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift b/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift index e7b90337f..9bf95af7d 100644 --- a/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift +++ b/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift @@ -12,7 +12,7 @@ public struct FeedCard: View { public var body: some View { VStack { HStack(alignment: .top, spacing: 6) { - VStack(alignment: .leading, spacing: 2) { + VStack(alignment: .leading, spacing: 4) { Text(item.unwrappedTitle) .font(.appCallout) .foregroundColor(.appGrayTextContrast) @@ -73,7 +73,7 @@ public struct FeedCard: View { Spacer() } } - .padding(.top, 2) + .padding(.top, 8) .padding(.bottom, 2) } .padding(.top, 16)