From c42b9c1b4eacfefac1e14174396433384df16ea0 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Fri, 4 Aug 2023 14:13:41 -0500 Subject: [PATCH] fix feed UI alignment issues (#1106) * fix feed alignment issues * fix reason line alignment --- src/view/com/posts/FeedItem.tsx | 153 +++++++++++++++++-------------- src/view/com/posts/FeedSlice.tsx | 3 + 2 files changed, 87 insertions(+), 69 deletions(-) diff --git a/src/view/com/posts/FeedItem.tsx b/src/view/com/posts/FeedItem.tsx index 9d2bc72b..9750ee50 100644 --- a/src/view/com/posts/FeedItem.tsx +++ b/src/view/com/posts/FeedItem.tsx @@ -32,10 +32,12 @@ import {makeProfileLink} from 'lib/routes/links' export const FeedItem = observer(function ({ item, isThreadChild, + isThreadLastChild, isThreadParent, }: { item: PostsFeedItemModel isThreadChild?: boolean + isThreadLastChild?: boolean isThreadParent?: boolean showReplyLine?: boolean }) { @@ -134,13 +136,17 @@ export const FeedItem = observer(function ({ ) }, [track, item, setDeleted, store]) - const isSmallTop = isThreadChild const outerStyles = [ styles.outer, pal.view, - {borderColor: pal.colors.border}, - isSmallTop ? styles.outerSmallTop : undefined, - isThreadParent ? styles.outerNoBottom : undefined, + { + borderColor: pal.colors.border, + paddingBottom: + isThreadLastChild || (!isThreadChild && !isThreadParent) + ? 12 + : undefined, + }, + isThreadChild ? styles.outerSmallTop : undefined, ] if (!record || deleted) { @@ -154,51 +160,62 @@ export const FeedItem = observer(function ({ href={itemHref} noFeedback accessible={false}> - {isThreadChild && ( - - )} - {isThreadParent && ( - - )} - {item.reasonRepost && ( - - - - Reposted by{' '} - - - - )} + + + + {isThreadChild && ( + + )} + + + + {item.reasonRepost && ( + + + + Reposted by{' '} + + + + )} + + + + {isThreadParent && ( + + )} ))}