From e2f17527ca52374342b67e141c70b795a0f882ae Mon Sep 17 00:00:00 2001 From: James Acklin Date: Mon, 3 May 2021 12:18:14 -0400 Subject: [PATCH] permalinks: pad sigils, unify author timestamp size systemwide fixes urbit/landscape#759 --- .../views/apps/permalinks/TranscludedNode.tsx | 4 ++ pkg/interface/src/views/components/Author.tsx | 54 ++++++++++--------- 2 files changed, 33 insertions(+), 25 deletions(-) diff --git a/pkg/interface/src/views/apps/permalinks/TranscludedNode.tsx b/pkg/interface/src/views/apps/permalinks/TranscludedNode.tsx index d8d514669..8407a2b6c 100644 --- a/pkg/interface/src/views/apps/permalinks/TranscludedNode.tsx +++ b/pkg/interface/src/views/apps/permalinks/TranscludedNode.tsx @@ -38,6 +38,7 @@ function TranscludedLinkNode(props: { pt='12px' pl='12px' size='24' + sigilPadding='6' showImage ship={node.post.author} date={node.post?.['time-sent']} @@ -93,6 +94,7 @@ function TranscludedComment(props: { pt='12px' pl='12px' size='24' + sigilPadding='6' showImage ship={comment.post.author} date={comment.post?.["time-sent"]} @@ -130,6 +132,7 @@ function TranscludedPublishNode(props: { pl='12px' pt='12px' size='24' + sigilPadding='6' showImage ship={post.post.author} date={post.post?.["time-sent"]} @@ -173,6 +176,7 @@ export function TranscludedPost(props: { pt='12px' pl='12px' size='24' + sigilPadding='6' showImage ship={post.author} date={post?.["time-sent"]} diff --git a/pkg/interface/src/views/components/Author.tsx b/pkg/interface/src/views/components/Author.tsx index 11b002149..d4a14151b 100644 --- a/pkg/interface/src/views/components/Author.tsx +++ b/pkg/interface/src/views/components/Author.tsx @@ -25,6 +25,7 @@ interface AuthorProps { api?: GlobalApi; size?: number; lineHeight?: string; + isRelativeTime?: boolean; } // eslint-disable-next-line max-lines-per-function @@ -97,7 +98,8 @@ export default function Author(props: AuthorProps & PropFunc): React e.stopPropagation(); toggleOverlay(); }} - height={size} + height={`${size}px`} + overflow='hidden' position='relative' cursor='pointer' > @@ -107,31 +109,33 @@ export default function Author(props: AuthorProps & PropFunc): React )} - - {copyDisplay} + + + {copyDisplay} + + { !dontShowTime && time && ( + + )} + {children} - { !dontShowTime && time && ( - - )} - {children} ); }