Commit Graph

177 Commits

Author SHA1 Message Date
Djordje Vlaisavljevic
0861c524df
Connected the endpoint for publishing notes (#21680)
close
https://linear.app/ghost/issue/AP-601/allow-users-to-publish-short-form-content-as-notes

---------

Co-authored-by: Michael Barrett <mike@ghost.org>
2024-11-21 20:00:01 +00:00
Djordje Vlaisavljevic
3abff38a53
Added UI for publishing short-form notes from Ghost admin (#21667)
ref https://linear.app/ghost/issue/AP-601/allow-users-to-publish-short-form-content-as-notes

- Added a button to the top of the feed that opens a modal that lets you write and short post

---------

Co-authored-by: Michael Barrett <mike@ghost.org>
2024-11-21 12:07:55 +00:00
Michael Barrett
2e9dbd3ef0
Fixed suggested accounts not rendering in admin-x-activitypub (#21655)
refs
[AP-606](https://linear.app/ghost/issue/AP-606/suggested-accounts-not-rendering-due-to-404)

Some of the suggested accounts in `admin-x-activitypub` were not
rendering due to the requests for the data returning a 404. This was due
to incorrect account handles being used. This commit fixes the issue by
ensuring the correct handles are being used. This commit also adds a new
hook to handle the fetching of suggested accounts that also limits and
randomizes the accounts returned.
2024-11-20 14:07:05 +00:00
Djordje Vlaisavljevic
232c897fa3
Split inbox and feed into separate tabs (#21642)
close https://linear.app/ghost/issue/AP-600/separate-feed-and-inbox-screens

- Instead of the layout switcher, we now have separate Inbox and Feed
tabs
- Inbox only shows long-form content (Articles)
- Feed only shows short-form content (Notes)
2024-11-19 17:04:39 +00:00
Djordje Vlaisavljevic
dc8f553fc3 Updated feed view layout so it's more compact
close https://linear.app/ghost/issue/AP-464/feed-view-visual-refinements
2024-11-19 13:27:55 +00:00
Djordje Vlaisavljevic
998ade4632
Added loading state to Your Profile page (#21638)
close
https://linear.app/ghost/issue/AP-515/add-loading-state-to-your-profile-page
2024-11-18 17:52:45 +00:00
Djordje Vlaisavljevic
86641268ab Stopped HTML cards with fixed width from causing overflow in the drawer
close https://linear.app/ghost/issue/AP-557/elements-in-articles-can-cause-horizontal-scrolling
2024-11-14 17:45:59 +00:00
Djordje Vlaisavljevic
6bf69b6a07
Fixed drawer “Back” button appearing in the wrong place (#21624)
ref https://linear.app/ghost/issue/AP-587/back-button-appears-in-wrong-spot-when-article-is-reached-through-a
2024-11-14 17:45:37 +00:00
Djordje Vlaisavljevic
af54b21bf3
Fixed separator showing even after the last list item (#21620)
close
https://linear.app/ghost/issue/AP-528/remove-unnecessary-separator-after-last-list-items

- Previously, in some components, we relied on CSS and all elements in
the list being the same type of an HTML element to show the separator.
Now, we've extracted the separator into its own component and place
after all items during mapping except the last one.
2024-11-14 17:42:43 +00:00
Djordje Vlaisavljevic
2a0ad25edc
Fixed activity badges not showing when the user doesn't have a profile icon (#21609)
ref https://linear.app/ghost/issue/AP-575/badges-are-not-showing-up-on-placeholder-avatars
2024-11-14 11:15:00 +00:00
Djordje Vlaisavljevic
5e5d5dc5da
Updated menu items to not trigger parent element on click (#21618)
close https://linear.app/ghost/issue/AP-576/clicking-copy-link-to-post-shouldnt-open-the-drawer

- Clicking on a menu item in the `...` dropdown now doesn’t trigger click handlers on parent elements, but it does close the Menu

Co-authored-by: Fabien O'Carroll <fabien@allou.is>
2024-11-14 11:13:37 +00:00
Djordje Vlaisavljevic
5863c40306
Improved Inbox view UI (#21600)
ref https://linear.app/ghost/issue/AP-521/improve-inbox-view-alignmentstructure

- Improved the layout, spacing and typography of Inbox view
- Removed attachment counters for images in Inbox view
- Added a very very small variant of `APAvatar`
2024-11-13 11:45:37 +00:00
Michael Barrett
0f2058cc2a
Fixed inbox tab not showing user's own posts in admin-x-activitypub (#21601)
refs
[AP-588](https://linear.app/ghost/issue/AP-588/inbox-tab-not-showing-users-own-posts)

Fixed inbox tab not showing user's own posts in admin-x-activitypub by
ensuring that the `includeOwn` parameter is set to `true` when fetching
the activities for the inbox tab
2024-11-12 15:59:26 +00:00
Fabien 'egg' O'Carroll
d555cc6612
Handled non-string preferredUsername values (#21598)
ref https://linear.app/ghost/issue/AP-585

If preferredUsername is not a string, and we attempt to render it, we
will crash the entire React application!
2024-11-12 21:22:45 +07:00
Djordje Vlaisavljevic
ea11367ea4
Stopped loading spinner flash when you first open Search page (#21569)
close
https://linear.app/ghost/issue/AP-531/search-spinner-flashes-for-a-split-second-when-switching-tab-for-the

- Fixed the logic for displaying “loading” and “no results found” states
- Refactored the component to avoid nested ternaries
2024-11-11 11:36:04 +00:00
Djordje Vlaisavljevic
b55ac9a03a
Fixed Articles appearing squeezed when opened from Notifications or Profile (#21587)
close
https://linear.app/ghost/issue/AP-581/article-content-appears-squeezed-when-opened-from-notifications-or
2024-11-11 09:31:04 +00:00
Djordje Vlaisavljevic
5138ef8ed3 Bumped admin-x-activitypub package
ref https://linear.app/ghost/issue/AP-522/inbox-view-thumbnail-size-inconsistencies
2024-11-07 17:36:03 +00:00
Djordje Vlaisavljevic
a9a72f9445 Made hover states for list items look nicer
ref https://linear.app/ghost/issue/AP-506/suggested-profiles-hover-refinement, https://linear.app/ghost/issue/AP-530/notifications-list-hover-state-is-inconsistent-with-the-rest, https://linear.app/ghost/issue/AP-516/profile-view-hover-state-on-profile
2024-11-07 17:36:03 +00:00
Djordje Vlaisavljevic
c5861a7664 Made all thumbnails in Inbox layout the same width
ref https://linear.app/ghost/issue/AP-522/inbox-view-thumbnail-size-inconsistencies
2024-11-07 17:36:03 +00:00
Djordje Vlaisavljevic
3709a4811e
Improved ActivityPub drawer view UI (#21521)
ref https://linear.app/ghost/issue/AP-507/inbox-view-missing-min-width-for-inbox-card, https://linear.app/ghost/issue/AP-562/remove-unused-viewfollowersmodal-and-viewfollowingmodal-files, https://linear.app/ghost/issue/AP-559/add-post-stats-and-buttons-to-articles-in-drawer-view, https://linear.app/ghost/issue/AP-468/drawer-visual-refinements, https://linear.app/ghost/issue/AP-558/add-actor-info-to-articles-in-drawer-view, https://linear.app/ghost/issue/AP-573/add-anchor-link-to-replies-in-the-drawer

- Made `Articles` in drawer view wider for better reading experience
- Added `Actor` info to `Articles` in drawer view for more context about who posted it
- Added `Like` and `Reply` buttons and counters to `Articles` in drawer view
- Clicking on a Reply notification or Reply icon in the drawer view now scrolls you directly to replies
- Removed modals we’re no longer using
- Updated `RoutingProvider` so it can work without any modals passed to
it
2024-11-07 15:59:29 +00:00
Fabien 'egg' O'Carroll
466d7fef3f
Bumb admin-x-activitypub to 0.3.10 (#21546)
closes https://linear.app/ghost/issue/AP-523
2024-11-06 11:07:17 +00:00
Fabien 'egg' O'Carroll
b591912c74
Updated the local state after following an account (#21509)
refs https://linear.app/ghost/issue/AP-523

We want to preempt the Accept activity from our Follows, so we make the
assumption that it's succeeded. What this means is that we have to
update our `following`, `followingCount` as well as the fetched profile
to set the `isFollowing` property. This gives a more fluid user
experience when following accounts and keeps our state up to date.

Accounts where the follow request has to be accepted manually, are a
little trickier as we don't currently have easy access to the "requested
but not accepted state"
2024-11-06 00:15:39 +07:00
Michael Barrett
0316c3f16e
Updated admin-x-activitypub to use consistent URL encoding (#21493)
refs
[TryGhost/ActivityPub](https://github.com/TryGhost/ActivityPub/pull/103)

Updated the API requests made by the `admin-x-activitypub` app to use
consistent URL encoding when making requests to the ActivityPub API
2024-11-04 10:40:06 +00:00
Michael Barrett
b90e16219d
Refactored collection retrieval in admin-x-activitypub (#21491)
no refs

Refactored collection retrieval to reduce code duplication and
complexity
2024-10-31 20:31:20 +00:00
Michael Barrett
3ecfe08e1d
Added failure state for reply in admin-x-activitypub (#21487)
no refs

Added a failure state for when a reply fails to be sent
2024-10-31 16:34:53 +00:00
Michael Barrett
dd2ed27d9d
Removed unused useAllActivitiesForUser hook and related code in admin-x-activitypub app (#21482)
no refs

Removed unused `useAllActivitiesForUser` hook and related code. This was
a left over from when we added paginated activities
2024-10-31 11:40:41 +00:00
renovate[bot]
085afdeb74 Pin dependency clsx to 2.1.1 2024-10-31 11:02:29 +00:00
Djordje Vlaisavljevic
45711e197c
AP design bugs (#21395)
- Fixed links in profile description
- Stripped post content
- Fixed grey bg in Avatars
- Installed `clsx`

---------

Co-authored-by: Michael Barrett <mike@ghost.org>
2024-10-31 10:50:51 +00:00
Djordje Vlaisavljevic
824efc7f10
Added UUID as data attribute to posts in all views (#21470)
ref
https://linear.app/ghost/issue/AP-404/add-uuid-as-a-data-attribute-in-the-dom-for-easier-db-lookup

- This will allow us to find posts in the DB

Co-authored-by: Michael Barrett <mike@ghost.org>
2024-10-31 10:07:52 +00:00
Djordje Vlaisavljevic
becfd13141
Refactored handleViewContent so it can be reused (#21468)
ref
https://linear.app/ghost/issue/AP-540/clicking-comment-icon-on-posts-and-likes-tabs-of-your-profile-doesnt

- We want to open posts in the drawer from multiple views (Inbox,
Profile etc.) and this change allows us to do so by pulling
`handleViewContent` from `Inbox.tsx` into a utility function. At the
same time, we’ve simplified the function so it uses less props to
achieve the same functionality.
- Also added a simple fix for scrolling the reply-box into view when
opening a long `article` by clicking on the reply icon. We probably
still need to figure out a more robust solution, because the height of
the `iframe` and the fact it takes some time to load it sometimes gets
in the way.

Co-authored-by: Michael Barrett <mike@ghost.org>
2024-10-31 09:58:47 +00:00
Michael Barrett
5f59ddaacc
Updated replies implementation to use thread mechanism in admin-x-activitypub (#21465)
refs:

- https://linear.app/ghost/issue/AP-439/seeing-parent-post-for-replies
- https://linear.app/ghost/issue/AP-481/reply-ui
-
https://linear.app/ghost/issue/AP-482/replies-to-a-post-should-be-visible-when-opening-it

Updated the replies implementation to make use of the new thread
mechanism. This allows for a more sane approach to handling replies as
well as making it possible to show the parent of a reply in the UI

---------

Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
2024-10-31 09:38:52 +00:00
Djordje Vlaisavljevic
c29905155f
Fixed incorrect actor passed from like notifications (#21451)
ref https://linear.app/ghost/issue/AP-541/incorrect-object-loaded-on-like-notifications

- We were passing the wrong `actor` info from `like` notifications. We should be using `activity.object.attributedTo` instead.
2024-10-29 20:55:30 +00:00
Michael Barrett
28a9a431db
Prevent replies from being shown on profile page in admin-x-activitypub (#21454)
refs
[AP-543](https://linear.app/ghost/issue/AP-543/posts-on-profile-should-not-include-replies)

Filtered the posts on the profile page to only show `Create` activities
that are not replies.
2024-10-29 17:07:01 +00:00
Djordje Vlaisavljevic
cc8a36cc12
Fixed articles getting cut off in the drawer (#21447)
ref
https://linear.app/ghost/issue/AP-542/articles-are-cut-off-when-viewed-in-sidebar

- We now wait for the content of the iframe to load completely before
determining the height needed to display it
2024-10-29 10:26:27 +00:00
Michael Barrett
e6df621436
Updated ActivityPub collection retrieval to accommodate pagination (#21393)
refs
[AP-526](https://linear.app/ghost/issue/AP-526/implement-pagination-for-fedify-collections)

Updated followers, following, outbox and liked collection retrieval to
accommodate pagination
2024-10-29 09:46:43 +00:00
Fabien 'egg' O'Carroll
f8ef2a1cb6
Fixed layout state sync issues (#21443)
refs https://linear.app/ghost/issue/AP-544

useState was still called twice, we should have pulled that out - but
instead passing values down for now
2024-10-29 03:17:57 +00:00
Fabien 'egg' O'Carroll
d4b1f692ab
Persisted activitypub layout to localstorage
closes https://linear.app/ghost/issue/AP-544

We're releasing this change immediately with v0.3.0
Also cleans up some props for the MainNavigation component.
2024-10-28 18:39:28 +07:00
Djordje Vlaisavljevic
880c88a184 Bumped admin-x-activitypub package
no ref
2024-10-23 19:44:40 +01:00
Djordje Vlaisavljevic
ba0c0439ab Made clicking users and posts on your profile bring up drawer view
ref https://linear.app/ghost/issue/AP-510/clicking-on-following-and-followers-users-should-open-the-drawer-on, https://linear.app/ghost/issue/AP-511/clicking-on-items-in-posts-and-liked-tabs-of-your-profile-should-open
2024-10-23 19:44:40 +01:00
Djordje Vlaisavljevic
79439b80c1 Made links inside posts look nicer
ref https://linear.app/ghost/issue/AP-513/show-nicer-links-in-posts
2024-10-23 19:44:40 +01:00
Djordje Vlaisavljevic
45df4bf860 Added ReplyBox to Articles viewed in drawer view
ref https://linear.app/ghost/issue/AP-514/show-replybox-when-article-is-opened-in-drawer
2024-10-23 19:44:40 +01:00
Michael Barrett
3d430b453f
Opened follow notifications in profile viewer in admin-x-activitypub (#21384)
refs
[#479](https://linear.app/ghost/issue/AP-479/open-profile-viewer-when-clicking-follow-notifications)

Clicking on a follow notification will now open the profile viewer with
details of the profile of the user that followed you

---------

Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
2024-10-23 14:26:31 +01:00
Michael Barrett
1b468f333b
Added buttons to show more data on profile in admin-x-activitypub (#21373)
no refs
2024-10-22 21:29:46 +01:00
Djordje Vlaisavljevic
26133095ea Added excerpt to Ghost posts
ref https://linear.app/ghost/issue/AP-124/view-full-article
2024-10-22 21:02:42 +01:00
Djordje Vlaisavljevic
773ce016b0 Made Following button disabled
ref https://linear.app/ghost/issue/AP-501/updated-suggested-users
2024-10-22 21:02:42 +01:00
Djordje Vlaisavljevic
36d15a4b40 Updated suggested users list
ref https://linear.app/ghost/issue/AP-501/updated-suggested-users
2024-10-22 21:02:42 +01:00
Michael Barrett
63afb15356
Added button to show more followers on profile in admin-x-activitypub (#21371)
no refs
2024-10-22 20:56:14 +01:00
Michael Barrett
e9914d8fe5
Fixed followers list on profile in admin-x-activitypub app (#21370)
refs
[AP-489](https://linear.app/ghost/issue/AP-489/followers-showing-unknown-on-user-profile)

Fixed the followers list on profile in admin-x-activitypub app by
utilising a custom endpoint to fetch a list of expanded followers
seeming though the followers endpoint only returns follower id's
2024-10-22 20:21:12 +01:00
Michael Barrett
b9768f99e9
Added posts to the user profile in admin-x-activitypub (#21369)
refs
[AP-484](https://linear.app/ghost/issue/AP-484/render-posts-on-user-profile)

Added posts to the user profile in admin-x-activitypub
2024-10-22 19:54:05 +01:00
Michael Barrett
febb7f720e
Used attributedTo for the Like activities on the profile page (#21367)
refs
[AP-487](https://linear.app/ghost/issue/AP-487/likes-on-profile-info-displaying-incorrect-actor-info)

Used `attributedTo` for the `Like` activities on the profile page of the
`admin-x-activitypub` app
2024-10-22 17:02:04 +01:00