From 60ff94943b85719dc21fa475343f5e02e243ebbb Mon Sep 17 00:00:00 2001 From: Djordje Vlaisavljevic Date: Wed, 27 Nov 2024 13:11:56 +0000 Subject: [PATCH] Improved inbox view UI (#21741) ref https://linear.app/ghost/issue/AP-609/give-inbox-ui-more-room-to-breathe - Vertically centered feature image - Timestamp next to the site title - More consistent spacing in hover state --- apps/admin-x-activitypub/package.json | 2 +- .../src/components/Inbox.tsx | 2 +- .../src/components/feed/FeedItem.tsx | 60 ++++++++++--------- .../src/components/feed/FeedItemStats.tsx | 2 +- 4 files changed, 34 insertions(+), 32 deletions(-) diff --git a/apps/admin-x-activitypub/package.json b/apps/admin-x-activitypub/package.json index 514e7d82c0..585518a35d 100644 --- a/apps/admin-x-activitypub/package.json +++ b/apps/admin-x-activitypub/package.json @@ -1,6 +1,6 @@ { "name": "@tryghost/admin-x-activitypub", - "version": "0.3.23", + "version": "0.3.24", "license": "MIT", "repository": { "type": "git", diff --git a/apps/admin-x-activitypub/src/components/Inbox.tsx b/apps/admin-x-activitypub/src/components/Inbox.tsx index 7a7b057955..0bddd17968 100644 --- a/apps/admin-x-activitypub/src/components/Inbox.tsx +++ b/apps/admin-x-activitypub/src/components/Inbox.tsx @@ -86,7 +86,7 @@ const Inbox: React.FC = ({layout}) => { ) : activities.length > 0 ? ( <> -
+
{layout === 'feed' &&
diff --git a/apps/admin-x-activitypub/src/components/feed/FeedItem.tsx b/apps/admin-x-activitypub/src/components/feed/FeedItem.tsx index e69aff0b8e..892830bd3a 100644 --- a/apps/admin-x-activitypub/src/components/feed/FeedItem.tsx +++ b/apps/admin-x-activitypub/src/components/feed/FeedItem.tsx @@ -94,7 +94,7 @@ export function renderFeedAttachment(object: ObjectProperties, layout: string) { function renderInboxAttachment(object: ObjectProperties) { const attachment = getAttachment(object); - const videoAttachmentStyles = 'ml-8 shrink-0 rounded-md h-[91px] w-[121px] relative'; + const videoAttachmentStyles = 'ml-8 md:ml-9 shrink-0 rounded-md h-[91px] w-[121px] relative'; const imageAttachmentStyles = clsx('object-cover outline outline-1 -outline-offset-1 outline-black/[0.05]', videoAttachmentStyles); if (!attachment) { @@ -392,37 +392,39 @@ const FeedItem: React.FC = ({actor, object, layout, type, comment return ( <> {object && ( -
-
- - {author.name} - {getRelativeTimestamp(date)} -
-
-
- - {object.name ? object.name : ( - - )} - -
- {object.content && `${getReadingTime(object.content)}`} +
+
+
+ + {author.name} + {getRelativeTimestamp(date)}
- {renderInboxAttachment(object)} -
- - +
+
+ + {object.name ? object.name : ( + + )} + +
+ {object.content && `${getReadingTime(object.content)}`} +
+
+ + +
+ {renderInboxAttachment(object)}
)} diff --git a/apps/admin-x-activitypub/src/components/feed/FeedItemStats.tsx b/apps/admin-x-activitypub/src/components/feed/FeedItemStats.tsx index 6dadd8f5f3..f43b099097 100644 --- a/apps/admin-x-activitypub/src/components/feed/FeedItemStats.tsx +++ b/apps/admin-x-activitypub/src/components/feed/FeedItemStats.tsx @@ -39,7 +39,7 @@ const FeedItemStats: React.FC = ({ setTimeout(() => setIsClicked(false), 300); }; - return (
+ return (