0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2024-12-30 22:34:01 -05:00
Commit graph

201 commits

Author SHA1 Message Date
Michael Barrett
1e9d09951e
Reduce number of notifications retrieved in admin-x-activtypub (#21928)
no refs

`250` takes a bit too long on the server so reducing it down to `120`
for now
2024-12-19 15:28:15 +00:00
Michael Barrett
e08959a1b5
Increased the number of notifications retrieved in admin-x-activitypub (#21925)
refs
[AP-626](https://linear.app/ghost/issue/AP-626/wrong-posts-showing-up-in-notifications)

Increased the number of notifications retrieved in `admin-x-activitypub`
to account for notifications being grouped and reduce the amount of time
waiting on requests to finish (by making fewer requests)
2024-12-19 13:19:26 +00:00
Michael Barrett
c438f9442f
Filtered notifications that show in admin-x-activitypub (#21903)
refs
[AP-627](https://linear.app/ghost/issue/AP-627/sanitising-note-content)

Adding client side filtering of the notifications in
`admin-x-activitypub` - This is a stop-gap until we have a dedicated
endpoint for returning notifications. Filtering includes:

- Do not show our own likes
- Only show `like` notifications when it is on our own posts
- Only show replies to our own posts
2024-12-19 11:58:24 +00:00
Michael Barrett
06cd63a3ab
Fixed intermittent error when posting a note in admin-x-activitypub (#21917)
refs
[AP-629](https://linear.app/ghost/issue/AP-629/notes-say-they-error-but-post-correctly)

Fixed intermittent error when posting a note in `admin-x-activitypub`

The error was intermittent due to it only occurring when a specific set
of steps occurred, and the query cache being periodically cleared.

The error itself was due to incorrectly expecting the `outbox:${handle}`
query to be an array when it was in fact an object.

This PR also resolves and issue where the reply count for new notes
would display `NaN` (because the `replyCount` property was not present
on newly created notes)
2024-12-18 19:05:31 +00:00
Djordje Vlaisavljevic
6595697864
Improved ActivityPub reader view (#21877)
ref https://linear.app/ghost/issue/AP-633/reader-view-customization-options, https://linear.app/ghost/issue/AP-631/estimated-reading-time-in-reader-view

- Improved typography, spacing and alignment.
- Improved selection of font sizes from the reader view customization popover.
- Added a button to reset reader view customization settings to default, in case user ends up in a state they’re not happy with and want to go back to a sensible default.
- Added preview to typeface selection component so it’s easier to see what you’re selecting.
- Disabled background clicks on all AP modals for a more consistent experience and to avoid accidental clicks.
- Changed the reading progress indicator increments from 1 to 5 to attract less attention while the user is reading.
2024-12-12 19:47:49 +00:00
Djordje Vlaisavljevic
038a3e5939
Improved ActivityPub reader view (#21854)
ref https://linear.app/ghost/issue/AP-633/reader-view-customization-options, https://linear.app/ghost/issue/AP-631/estimated-reading-time-in-reader-view

- Added reader view customization options (typefaces, font sizes and line height) which allow users to make the reading experience suit their personal needs and taste. Changing the font size also subtly tweaks the spacing and width of the articles.
- Added an estimated reading time and a simple text-based progress indicator, so users have a better idea of the article length and their progress when reading long-form content.
2024-12-11 18:58:46 +00:00
Djordje Vlaisavljevic
4597abddff Improved grouped notifications UI
ref https://linear.app/ghost/issue/AP-625/implement-notification-grouping-for-follows-and-likes

- Improved handling for notification clicks of various types: single follower notification opens that follower in the drawer, multiple followers expands the followers list, liked post opens the article in the wide drawer, liked note opens the note in the narrow drawer
- Improved hover and click states for profile names, usernames and avatars. Now it's more obvious what's clickable, and clicking on any of these elements in any context opens that profile in the drawer.
- Created a handleProfileClick utility since we're using it in a lot of places.
- Removed unnecessary types
- Made the HTML structure more semantic
2024-12-06 17:04:39 +00:00
Djordje Vlaisavljevic
becfc5013c
Improved spacing and alignment in notifications (#21820)
ref https://linear.app/ghost/issue/AP-625/implement-notification-grouping-for-follows-and-likes

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2024-12-06 13:14:41 +00:00
Djordje Vlaisavljevic
e7a9b2a720
Made similar notifications appear grouped together (#21805)
ref https://linear.app/ghost/issue/AP-625/implement-notification-grouping-for-follows-and-likes

- Added basic frontend grouping for Follow and Like notifications, so the page is easier to scan through. For each loaded batch of notifications we check if they can be grouped (all follows get grouped, all likes for a certain post get grouped) and then merge those grouped pages of notifications.
- Improved UI for notifications, with notification type icons for each group.
- Added a utility for truncating text.
2024-12-05 21:52:03 +00:00
Djordje Vlaisavljevic
81ae18bcb6 Added support for WordPress formatting in notes
ref https://linear.app/ghost/issue/AP-622/add-support-for-rich-text-formatting-of-notes

- Until now we only had plain text with line breaks and links inside `note` objects. But WordPress is very flexible and allows users to put almost all of their blocks inside a `note`, like headings, lists and blockquotes. We now support those in Ghost, but with minimal formatting to keep the feed clean and easy to scan through.
2024-12-03 12:41:37 +00:00
Djordje Vlaisavljevic
550a52598c
Fixed WordPress article feature image not showing (#21779)
ref https://linear.app/ghost/issue/AP-619/feature-images-from-wordpress-are-[object-object]

- WordPress puts the feature image into an `image` object, rather than putting the URL directly into an `image` string. We now properly render this.
2024-12-02 15:50:27 +00:00
Djordje Vlaisavljevic
940914609f
Updated drawer so you can interact with page behind it (#21778)
ref https://linear.app/ghost/issue/AP-613/make-drawer-wider-when-displaying-articles-on-larger-screens

- Added a prop to Modal which allows you to interact with the page
behind the Modal, so the main navigation could still be used while the
Article modal is opened
- Removed the breakpoint we only use in one place, and switched to using
an arbitrary Tailwind breakpoint that matches the one in admin instead
2024-12-02 13:12:05 +00:00
Michael Barrett
04ed106c73
Refactored data loading to be more performant in admin-x-activitypub (#21770)
refs
[AP-614](https://linear.app/ghost/issue/AP-614/investigate-client-loading-issues)

Refactored data loading to be more performant in admin-x-activitypub:
- Utilised tanstack query for suggested profiles instead of rolling our
own custom hook. This allows us to utilise tanstack for caching
- Refactored how data is loaded for the Inbox / Feed view - Queries are
no longer cleared when switching between the 2 layouts
- Refactored how activity data is key'd to make caching more
deterministic as well as allow mutating a specific activity cache (i.e
when adding a note, ensure it only gets added the the feed activities)
- Removed redundant `excludeNonFollowers` parameter - This is no longer
used by the API
2024-11-30 22:41:51 +00:00
Michael Barrett
995edaa966
Refactored minor things in admin-x-activitypub (#21769)
Just a bunch of minor refactorings in admin-x-activitypub:

- Reorganised api methods
- Reorganised api query hooks
- Reorganised api tests
- Removed redundant `getActor` api method
- Colocate `Search` type with component
- Moved `ViewProfileModal` to `modals`
- Refactored profile
- Remove redundant `useFollowersForUser`
- Remove redundant `useBrowseInboxForUser`
- Removed redundant acceptance tests
2024-11-30 17:35:38 +00:00
Michael Barrett
c7d4facd85
Added infinite scroll to profile page collections in admin-x-activitypub (#21768)
no refs

Added infinite scroll to profile page collections in admin-x-activitypub
2024-11-30 15:51:51 +00:00
Michael Barrett
e2bccbc49f
Utilised endpoint for retireving profile posts in admin-x-activitypub (#21767)
no refs

Updated the profile modal in admin-x-activitypub to retrieve profile
posts from the dedicated profile posts endpoint
2024-11-29 23:37:35 +00:00
Djordje Vlaisavljevic
f65f5b1426
Made drawer view for Articles wider for easier reading (#21760)
ref https://linear.app/ghost/issue/AP-613/make-drawer-wider-when-displaying-articles-on-larger-screens

- The drawer view for viewing Articles was only slightly wider than the
one for viewing Posts. Since we've decided to make a bigger separation
between these 2 types of post, we wanted to make the drawer almost full
width (excluding the main navigation sidebar).
- This also removes the backdrop from drawer view so the interaction
would be lighter.
- To achieve this we're adding another CSS breakpoint so it would match
the one used in Admin. We didn’t have one since our DS was mostly used
in isolation in Settings.
2024-11-28 19:08:03 +00:00
Djordje Vlaisavljevic
a8a1095910 Cleaned up stylesheet used to display ActivityPub Articles
close https://linear.app/ghost/issue/AP-574/clean-up-iframe-css

- When we began working on ActivityPub integration, we reused the styles from our default Source theme and added default Ghost card styles. This meant we could quickly have nice-looking posts in the admin, but also meant we have some unnecessary lines of CSS. This is now cleane up, resulting in a ~40% smaller file.
2024-11-28 16:27:10 +00:00
Djordje Vlaisavljevic
772e22c5f8 Updated hover state for 'back' button
ref https://linear.app/ghost/issue/AP-599/make-hover-and-click-states-for-buttons-consistent

- 'Back' button in the drawer was missing the hover state we're using for other icon buttons. Now it's consistent with the rest.
2024-11-28 16:27:10 +00:00
Djordje Vlaisavljevic
40adb28f28 Turned off autocomplete in Search input field
close https://linear.app/ghost/issue/AP-612/autofill-appears-in-searchfield

- Safari autocompletes our Search field because it mentions the word 'username' in the placeholder text, but we don't want that as users don't really want to search for their own usernames.
2024-11-28 16:27:10 +00:00
Djordje Vlaisavljevic
355f361b64
Updated font sizes and colors for better hierarchy (#21755)
ref https://linear.app/ghost/issue/AP-609/give-inbox-ui-more-room-to-breathe

- Posts in the inbox view used the same font colors and sizes for
elements of different importance. Now the contrast and hierarchy of
elements is improved which makes it easier to browse the posts.
- Larger border radius on hover better fits the size of posts.
2024-11-28 14:26:36 +00:00
Djordje Vlaisavljevic
894e1ed798
Improved posts design and icon button hover states (#21754)
close https://linear.app/ghost/issue/AP-599/make-hover-and-click-states-for-buttons-consistent, https://linear.app/ghost/issue/AP-616/improve-feed-view-design

- Updated design for posts shown in the feed, reply and drawer views
- Consistent hover and click states for icon buttons
- Fixed inbox view posts overlapping with the sidebar suggestions
2024-11-28 13:47:56 +00:00
Djordje Vlaisavljevic
60ff94943b
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
2024-11-27 13:11:56 +00:00
Djordje Vlaisavljevic
d32955b21e
Made inbox view easier to scan through (#21729)
ref https://linear.app/ghost/issue/AP-609/give-inbox-ui-more-room-to-breathe

- Added more white space
- Made more lines of text for titles and excerpts visible
- Added estimated reading time
- Updated feature image size and position
2024-11-26 17:35:25 +00:00
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