Commit Graph

97 Commits

Author SHA1 Message Date
Fabien O'Carroll
146e702d93 Updated @tryghost/admin-x-activitypub to 0.1.0
This will test the release when we merge to main
2024-09-26 23:24:26 +07:00
Fabien O'Carroll
d9a2b0e3a6 Removed private flag
This is necessary so that we can publish to npm
2024-09-26 23:24:26 +07:00
Djordje Vlaisavljevic
cad5e27de9 Fixed Article feature image not showing up in the feed
ref https://linear.app/tryghost/issue/AP-433/article-feature-image-not-showing-in-the-feed
2024-09-25 10:27:24 +01:00
Daniel Lockyer
0187d6b6a2 Fixed versioning and npm visibility for internal apps
- these apps don't need to be published because they're internal and get
  compiled into Admin
- therefore, we can reset their versions back to 0.0.0 and remove the
  publishConfig block so we don't accidentally publish them
2024-09-25 09:09:06 +02:00
Fabien 'egg' O'Carroll
8a1e71a553
Implemented lazy loading for Inbox & Activities (#21106)
closes https://linear.app/tryghost/issue/AP-421

This makes loading the inbox and activity tabs _way_ faster, so we no
longer have to artificially restrict the amount of data coming in, it
also gives us proper pagination for both views.
2024-09-25 12:20:07 +07:00
Fabien O'Carroll
293a57adc7 Added fallback for Avatars when image loading fails
closes https://linear.app/tryghost/issue/AP-422

We found that some images will 403 when hotlinked, showing broken images, we
can catch these errors and render the default instead.
2024-09-24 16:51:01 +07:00
Michael Barrett
1a6da539b3
Updated activitypub app in preparation for pagination (#21054)
refs
[TryGhost/ActivityPub#44](https://github.com/TryGhost/ActivityPub/pull/44)

To support pagination in the activitypub app, the following changes have
been made:

- Move filtering and sorting of activities to the server
- Refactor how comments are processed (comments are now returned as part
of the activity)
- Refactor how replies to own activities are processed in the activities
tab (removed object map)
2024-09-24 10:46:56 +01:00
Djordje Vlaisavljevic
f1553c385d Added break-all to links inside notes to avoid overflows
ref https://linear.app/tryghost/issue/AP-412/need-break-all-for-long-strings-in-replies
2024-09-23 21:59:18 +01:00
Djordje Vlaisavljevic
281f497606 Added formatting for numbers in Tab counters and FeedItem stat counters
ref https://linear.app/tryghost/issue/AP-425/use-formatted-numbers-everywhere
2024-09-23 21:59:18 +01:00
Djordje Vlaisavljevic
b7ef6ef521 Added more flexible layout for profile attachments
ref https://linear.app/tryghost/issue/AP-305/profile-viewer-component-that-can-render-activitypub-actor-data
2024-09-23 21:59:18 +01:00
Djordje Vlaisavljevic
2ab618709a Linked timestamps to original post URLs for easier navigation
ref https://linear.app/tryghost/issue/AP-408/add-link-to-original-post-location-in-ui-for-better-navigation
2024-09-23 21:59:18 +01:00
Fabien O'Carroll
2681e526f6 Fixed type errors for admin-x-activitypub
We didn't catch these because ci type checks weren't running, but they are now!
2024-09-21 10:20:20 +07:00
Fabien O'Carroll
92c17ade34 Ensured types are checked as part of unit tests
Otherwise we get green ticks on a PR and then the build fails on main
2024-09-21 10:20:20 +07:00
Djordje Vlaisavljevic
674227941e Added nicer focus state so text and button don't clash
ref https://linear.app/tryghost/issue/AP-307/component-for-replying-to-objects-in-the-inboxfeed
2024-09-21 09:39:42 +07:00
Djordje Vlaisavljevic
ae50afe307 Fixed linting issue
ref https://linear.app/tryghost/issue/AP-307/component-for-replying-to-objects-in-the-inboxfeed
2024-09-21 09:39:42 +07:00
Djordje Vlaisavljevic
9bd2b26226 Fixed avatars appearing stretched in replies
ref https://linear.app/tryghost/issue/AP-374/add-design-for-replies
2024-09-21 09:39:42 +07:00
Djordje Vlaisavljevic
9b2228708a Improved feed item layout and typography
ref https://linear.app/tryghost/issue/AP-282/render-notes-in-the-frontend
2024-09-21 09:39:42 +07:00
Djordje Vlaisavljevic
6d873600f0 Simplified drawer design
ref https://linear.app/tryghost/issue/AP-282/render-notes-in-the-frontend
2024-09-21 09:39:42 +07:00
Djordje Vlaisavljevic
4aa5e4f091 Added Just now as a timestamp
ref https://linear.app/tryghost/issue/AP-282/render-notes-in-the-frontend
2024-09-21 09:39:42 +07:00
Fabien O'Carroll
0cf5d11bf2 Fixed bugs with textarea focus on disabled states 2024-09-21 09:39:42 +07:00
Fabien O'Carroll
bd2a0369ed Added new reply to the comments state
ref https://linear.app/tryghost/issue/AP-395

This is a stopgap solution, because currently we don't have any of our own
reply data in the frontend, so this will show the new reply, but it won't be
present on page reload. Should be enough for a demo video, but I think we need
to either fetch our outbox, or make a new replies endpoint and fetch from there
2024-09-21 09:39:42 +07:00
Fabien O'Carroll
8cc3646c29 Fixed post reply button
ref b9d02f8051beb9120a282bcbf0f70440c2a3c39e

Because we disabled the button on blue of the textarea, it was being disabled
before the click would be handled! Using the mousedown event means that our
event gets handled before the blur.
2024-09-21 09:39:42 +07:00
Fabien O'Carroll
78bb1461a8 Focused reply input when clicking comment button in drawer
ref https://linear.app/tryghost/issue/AP-396

We need to use a number instead of boolean here so that the state is always
refreshed, otherwise we can run into issues where we set `focused` to true but
there's no rerender because it was previously set to true, but unfocused
2024-09-21 09:39:42 +07:00
Fabien O'Carroll
6a3632e457 Updated button based on focus state
ref https://linear.app/tryghost/issue/AP-398

This adds an internal focus state so that we can render the reply box different
based on whether or not the textarea is focused!
2024-09-21 09:39:42 +07:00
Fabien O'Carroll
403cac4c42 Focused reply box when clicking comment button on feed item
ref https://linear.app/tryghost/issue/AP-396

I think it's nicer API to pass in a focused property, rather than an
element ref, but I don't have much experience here, so it might be the
wrong approach!
2024-09-21 09:39:42 +07:00
Fabien O'Carroll
3e6b3bda8a Populated reply box avatar
ref https://linear.app/tryghost/issue/AP-397

I think we're gonna want to pass this data into the component long
term, but this will do for now, I'm going to look at cleaning up these
components in my next B week
2024-09-21 09:39:42 +07:00
Fabien O'Carroll
e8e44a0312 Added toast notification for successful reply
ref https://linear.app/tryghost/issue/AP-395
2024-09-21 09:39:42 +07:00
Fabien O'Carroll
5ff7dce5a2 Emptied reply textarea after reply success
ref https://linear.app/tryghost/issue/AP-395

I've also set the disabled prop here too, not sure if necessary
2024-09-21 09:39:42 +07:00
Fabien O'Carroll
82328708ac Set loading state of the post reply button
ref https://linear.app/tryghost/issue/AP-394

I've also passed the disabled prop, but not sure if it's necessary
2024-09-21 09:39:42 +07:00
Djordje Vlaisavljevic
f60f22be2d Added placeholder text to AP reply box
ref https://linear.app/tryghost/issue/AP-399/add-reply-box-placeholder
2024-09-21 09:39:42 +07:00
Fabien O'Carroll
ea9fcd8f2a Initial wire up of reply box to the API
ref https://linear.app/tryghost/issue/AP-287
2024-09-21 09:39:42 +07:00
Djordje Vlaisavljevic
b6c5cca890 Updated AP reply box design
ref https://linear.app/tryghost/issue/AP-307/component-for-replying-to-objects-in-the-inboxfeed
2024-09-21 09:39:42 +07:00
Djordje Vlaisavljevic
6df9ad6537 Added Copy link button to feed items
ref https://linear.app/tryghost/issue/AP-308/ui-for-deleting-replies
2024-09-21 09:39:42 +07:00
Djordje Vlaisavljevic
6708787731 Added static reply box for ActivityPub content
ref https://linear.app/tryghost/issue/AP-307/component-for-replying-to-objects-in-the-inboxfeed
2024-09-21 09:39:42 +07:00
Djordje Vlaisavljevic
1680817da2 Added More menu for feed items and static Delete menu item
ref https://linear.app/tryghost/issue/AP-308/ui-for-deleting-replies

- Added `dotdotdot` icon
- Added optional `destructive` prop to `Menu` items
2024-09-21 09:39:42 +07:00
Michael Barrett
a886d22437
Updated activities tab to use the activities endpoint in the activitypub app (#21037)
refs
[AP-377](https://linear.app/tryghost/issue/AP-377/inbox-returning-33mb-of-data),
[TryGhost/ActivityPub#43](https://github.com/TryGhost/ActivityPub/pull/43)

Updated activities tab to use the activities endpoint in the activitypub
app
2024-09-19 10:45:54 +01:00
Michael Barrett
d7ee3b2e42
Updated activitypub app to utilise new activities endpoint (#21025)
refs
[AP-377](https://linear.app/tryghost/issue/AP-377/inbox-returning-33mb-of-data),
[TryGhost/ActivityPub#40](https://github.com/TryGhost/ActivityPub/pull/40)

Updated activitypub app to utilise new activities endpoint which returns
a paginated list of activities
2024-09-18 10:33:52 +01:00
Michael Barrett
4ace5104a6
Added toggle sidebar size button to article modal in admin-x-activitypub (#21015)
no refs

Added a button to toggle sidebar size from the article modal in the
admin-x-activitypub app
2024-09-16 16:50:22 +01:00
Michael Barrett
12710eaefa
Added open reply notification in sidebar functionality (#21014)
no refs

Added logic to open the notification in the sidebar when the
notification is clicked if it is a reply notification
2024-09-16 16:49:52 +01:00
Fabien 'egg' O'Carroll
a44274d7f3
Fixed hostname check for reply notificiations (#21002)
In order to show replies in our notifications, we loop through all the
replies in our inbox, and filter them by the ones replying to an account
on our domain, however the check we were doing was on the admin domain -
which is sometimes the same as the frontend domain, but not always. This
fixes the check so that we check the frontend domain, which is the one
used by activitypub.
2024-09-13 16:54:31 +07:00
Fabien 'egg' O'Carroll
9e4704a75f
Fixed the rendering of object attachments (#21001)
Pulled out the logic of finding the attachment(s) into a shared
function, which will only return an array if there are multiple
attachments, otherwise either null or an object will be returned.

This fixes an issue where the code assumed that an array meant
we have multiple attachments
2024-09-13 16:14:23 +07:00
Fabien 'egg' O'Carroll
c98ff3856e
Used attributedTo over actor when available (#20998)
refs https://linear.app/tryghost/issue/AP-388

The attributedTo property of objects refers to the author of the object,
wheras the actor of an activity refers to the author of the activity -
in the case of a `Create` activity - these are generally the same, but
in the case of an `Announce` they are different, the author refers to
the "announcer" and the attributedTo the author of the content! This is
a quick patch to use the true author when it's available, and in a
format we can handle.
2024-09-13 05:54:25 +00:00
Djordje Vlaisavljevic
eb796e0785 Fixed nested Replies line placement
ref https://linear.app/tryghost/issue/AP-374/add-design-for-replies
2024-09-12 16:35:50 +01:00
Djordje Vlaisavljevic
a087e329ed
Updated ActivityPub Feed and Replies design (#20992)
- Added activity icon for Replies
- Updated Replies design
- Updated hard-coded Profile values to more realistic ones
- Renamed ActivityPub nav item and moved it to the top of the navbar
- Added a check for post attachments
2024-09-12 16:03:49 +01:00
Michael Barrett
6704705c86
Added comment navigation in the admin-x-activitypub app (#20987)
refs
[AP-279](https://linear.app/tryghost/issue/AP-279/handle-incoming-replies)

Implemented a basic navigation stack for comments in the
admin-x-activitypub app. This allows users to navigate between comments.
2024-09-12 10:23:27 +01:00
Michael Barrett
2fc6634573
Added nested comment rendering in admin-x-activitypub app (#20980)
refs
[AP-279](https://linear.app/tryghost/issue/AP-279/handle-incoming-replies)

Added nested comment rendering in admin-x-activitypub app so that
replies to posts and replies to replies can be viewed by the user
2024-09-12 08:20:39 +01:00
Michael Barrett
2cb9cf8b8b
Added comments to activities in the admin-x-activitypub app (#20958)
refs
[AP-279](https://linear.app/tryghost/issue/AP-279/handle-incoming-replies)

Wired up the comments to the activities in the admin-x-activitypub app
so that comments (replies) can be viewed by the user
2024-09-11 17:44:12 +01:00
Michael Barrett
cbacea418f
Added reply handling to the notifications tab of the admin-x-activitypub app (#20956)
refs
[AP-279](https://linear.app/tryghost/issue/AP-279/handle-incoming-replies)

Added reply handling to the notifications tab of the admin-x-activitypub
app so that replies to posts can be viewed by the user
2024-09-11 17:36:02 +01:00
renovate[bot]
c96744156e
Update dependency @playwright/test to v1.46.1 (#20866) 2024-09-06 10:35:50 -07:00
Fabien O'Carroll
7ee15044e9 Fixed animation of love heart bump
Resetting the isClicked state immediately would cancel the animation
2024-09-06 21:07:13 +07:00