From 490a3bb751d95ccb7313a0805baf78ab6e62d944 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Mon, 28 Nov 2022 09:49:41 -0600 Subject: Tune post-thread expanded view: add reply prompt, fix spacing and sizing --- src/view/com/post-thread/PostThreadItem.tsx | 205 ++++++++++++++-------------- 1 file changed, 106 insertions(+), 99 deletions(-) (limited to 'src/view/com/post-thread/PostThreadItem.tsx') diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index 8a2d5068e..3eefeae96 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -16,6 +16,7 @@ import {useStores} from '../../../state' import {PostMeta} from '../util/PostMeta' import {PostEmbeds} from '../util/PostEmbeds' import {PostCtrls} from '../util/PostCtrls' +import {ComposePrompt} from '../composer/Prompt' const PARENT_REPLY_LINE_LENGTH = 8 const REPLYING_TO_LINE_LENGTH = 6 @@ -93,116 +94,122 @@ export const PostThreadItem = observer(function PostThreadItem({ if (item._isHighlightedPost) { return ( - - - - - - - - - - - - {item.author.displayName || item.author.handle} - - - - · {ago(item.indexedAt)} - - - - + + + + + - - - - - - @{item.author.handle} - - - - - - - - - {item._isHighlightedPost && hasEngagement ? ( - - {item.repostCount ? ( + + - - - {item.repostCount} - {' '} - {pluralize(item.repostCount, 'repost')} + style={styles.metaItem} + href={authorHref} + title={authorTitle}> + + {item.author.displayName || item.author.handle} - ) : ( - <> - )} - {item.upvoteCount ? ( + + · {ago(item.indexedAt)} + + + + + + + - - - {item.upvoteCount} - {' '} - {pluralize(item.upvoteCount, 'upvote')} + style={styles.metaItem} + href={authorHref} + title={authorTitle}> + + @{item.author.handle} - ) : ( - <> - )} + + + + + + + + + {item._isHighlightedPost && hasEngagement ? ( + + {item.repostCount ? ( + + + + {item.repostCount} + {' '} + {pluralize(item.repostCount, 'repost')} + + + ) : ( + <> + )} + {item.upvoteCount ? ( + + + + {item.upvoteCount} + {' '} + {pluralize(item.upvoteCount, 'upvote')} + + + ) : ( + <> + )} + + ) : ( + <> + )} + + - ) : ( - <> - )} - - - + + ) } else { return ( @@ -371,7 +378,7 @@ const styles = StyleSheet.create({ borderTopWidth: 1, borderBottomWidth: 1, marginTop: 5, - marginBottom: 10, + marginBottom: 15, }, expandedInfoItem: { marginRight: 10, -- cgit 1.4.1