0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
Commit graph

86 commits

Author SHA1 Message Date
Djordje Vlaisavljevic
8c2e62dc23
Improved ActivityPub design (#22051)
ref https://linear.app/ghost/issue/AP-677/standardize-border-radius-used-in-avatars, https://linear.app/ghost/issue/AP-680/standardize-font-sizes-colors-and-weights, https://linear.app/ghost/issue/AP-676/improve-the-sidebar-widget

- Ensured consistent use of border-radius in avatars
- Removed onClick for large avatars, since we only use them when you're already viewing someone's profile
- Updated font colors, weights and sizes for consistency
- Updated design of the sidebar widget in (simpler design, less lines, tighter spacing=
- "Explore" button looks more like what we use in settings and dashboard
2025-01-23 17:35:05 +00:00
Djordje Vlaisavljevic
2d0f6568fa
Fixed reading progress indicator for very short articles (#22036)
ref https://linear.app/ghost/issue/AP-653/scroll-percentage-remains-at-0percent-when-no-content-to-scroll

- When an entire article fits into the viewport height, we used to
show`0%` in the reading progress indicator. Now we check if that's the
case, and then show `100%` if it is.
2025-01-22 17:49:11 +00:00
Djordje Vlaisavljevic
cf9c0199c3 Fixed posts not opening when clicked from profile feed
no ref
2025-01-20 22:40:58 +00:00
Djordje Vlaisavljevic
6b9e6b2cd1 Updated Article design on Profiles
ref https://linear.app/ghost/issue/AP-534/profile-weird-button-hover-state-in-post-list

- While we've separated Inbox and Feed views, we're still showing both Notes and Articles together in Profiles. Articles had a confusing hover state and also felt disconnected. The new design is similar to the one used in the new publishing flow, with adjustments where it makes sense.
- Added more useful alt descriptions
- Fixed images from Thread notes not showing
2025-01-20 18:49:59 +00:00
Michael Barrett
026bb8ffbf
Updated search results account type in admin-x-activitypub (#22021)
no refs

Updated the search results account type in the admin-x-activitypub to
match the updated API response
2025-01-16 21:02:02 +00:00
Djordje Vlaisavljevic
e5ea3a0a8c Fixed "Show all" button not appearing on profile summaries
no ref
2025-01-16 19:14:02 +00:00
Djordje Vlaisavljevic
0f1d6167cf
Extracted TableOfContents into a separate component (#22019)
ref https://linear.app/ghost/issue/AP-634/table-of-contents-in-reader-view

- `TableOfContents` is now a separate component to keep `ArticleModal` simpler
- Switched to using constants for styling different heading levels for better performance and maintainability
2025-01-16 14:32:16 +00:00
Djordje Vlaisavljevic
7bc1102cc6 Improved how we represent unusual article heading structures
ref https://linear.app/ghost/issue/AP-634/table-of-contents-in-reader-view

- Sometimes publishers use headings in unusual ways (for example, using just `h3`s). This means we can't rely on headings always being structured in the expected way (`h1`, `h2`, `h3`...) Now after we scan the article for headings, we find the highest level heading and then calculate normalized levels for all other headings. This helps the widget look good even in these edge cases.
2025-01-16 13:30:39 +00:00
Michael Barrett
4ebf4dd1b0
Fixed missing author handle in admin-x-activitypub (#22011)
refs
[AP-647](https://linear.app/ghost/issue/AP-648/refactor-profile-tab-to-use-account-and-follows)

Fixed missing author handle in admin-x-activitypub
2025-01-15 17:53:38 +00:00
Michael Barrett
6bc164cb7c
Updated profile tab to use dedicated account endpoints in admin-x-activitypub (#22010)
refs
[AP-647](https://linear.app/ghost/issue/AP-648/refactor-profile-tab-to-use-account-and-follows)

Updated the profile tab in `admin-x-activitypub` to use dedicated
account endpoints. This is to remove coupling between the UI and the
ActivityPub endpoints in preparation for the upcoming changes around
storing `accounts` and `follows` in the database
2025-01-15 16:43:51 +00:00
Djordje Vlaisavljevic
73f8bcf0b3
Added table of contents widget to article modal (#22008)
ref https://linear.app/ghost/issue/AP-634/table-of-contents-in-reader-view

- Adds a table of contents widget to the right side of articles in
reader view that let's you navigate between headings for easier
navigation in long, complex articles
- Enhanced popover component with configurable side positioning
- Updated package version to 0.3.44
2025-01-15 14:33:08 +00:00
Michael Barrett
20a1b64a15
Handle null values for post content & excerpt in admin-x-activitypub (#21989)
Handle null values for post content & excerpt in admin-x-activitypub

refs [TryGhost/ActivityPub#245](https://github.com/TryGhost/ActivityPub/pull/245)

In [TryGhost/ActivityPub#245](https://github.com/TryGhost/ActivityPub/pull/245) we changed the service to allow for `null` values for the `content` & `excerpt` field. This means we could potentially be passing `null` values to `stripHtml` which would cause the app to crash. This commit ensures we always pass a string to `stripHtml` as well as updating the types to reflect what the value can be
2025-01-09 15:32:06 +00:00
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
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
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
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
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
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
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
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
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
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
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
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