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

2207 commits

Author SHA1 Message Date
Ronald Langeveld
dbcbabb99a
Add comments loading state action (#21834)
ref https://github.com/TryGhost/Ghost/pull/21788#discussion_r1869802093

- Introduced `setCommentsIsLoading` action to handle the loading state
of comments dynamically.
- Updated `setOrder` function to dispatch the `setCommentsIsLoading`
action, ensuring proper UI feedback during asynchronous operations.
2024-12-09 16:09:14 +08: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
Sanne de Vries
9350ccf1db Removed hover effect on replied-to refs for unpublished comments
REF https://linear.app/ghost/issue/PLG-294/remove-link-from-replied-to-[hiddenremoved]
2024-12-05 18:02:38 +00:00
Kevin Ansfield
7e60172027 Removed link from replied-to ref when deleted/hidden
closes https://linear.app/ghost/issue/PLG-294

- making the `replied to: [removed]` text a link was a bit confusing because clicking it does nothing
- if the replied-to comment doesn't exist (e.g. hidden/deleted and not returned in API response) or has been unpublished we replace the `<a>` with a `<span>` to remove the link behaviour
2024-12-05 18:02:38 +00:00
Kevin Ansfield
0651d7178b Extracted <RepliedToSnippet> component from <CommentHeader>
no issue

- keeps logic inside `<CommentHeader>` single-purpose
- allows for cleaner code when adding logic to remove the link when the replied-to comment is removed
- switched `queryByText` to `getByText` in the test to make debugging easier, the latter will print the current DOM if it fails to find an element

# Conflicts:
#	apps/comments-ui/src/components/content/Comment.tsx
2024-12-05 18:02:38 +00:00
Sanne de Vries
f06de99410
Added highlight animation when scrolling to replied-to comment (#21781)
REF https://linear.app/ghost/issue/PLG-284

When clicking on a replied-to reference, you scroll up to the parent comment. To guide the eye, the parent comment is highlighted with a yellow background.

- added `dispatchAction` to the `ActionHandler` function call arguments, allowing actions to call other actions
- added `commentIdToHighlight` app context state and associated `highlightComment` action to set it
- updated `Comment` (and related sub-components) to match `commentIdToHighlight` when rendering to determine whether to apply highlighting of comment contents
- for the highlight, `<mark>` is used to wrap any paragraphs inside the comment contents and appropriate tailwind highlight animation classes applied
  - uses the inline `<mark>` element so that background highlight only applies to the text bounding boxes rather than the entire wrapping element

---------

Co-authored-by: Ronald Langeveld <hi@ronaldlangeveld.com>
2024-12-05 17:46:16 +00:00
Steve Larson
428eebeaf8
Added custom font support for themes (#21817)
ref [DES-949](https://linear.app/tryghost/issue/DES-949/

177e604501

This adds custom fonts feature allowing users to select heading and body
fonts for their themes from a curated list. This allows publishers to
have more control over their brand, and allows themes to have a wider
range of styles to appeal to different audiences.

Without custom fonts support, themes will continue to work as normal,
but users won't be able to customize their typography. As for the
official themes, all of them will support custom fonts.
2024-12-05 16:39:41 +00:00
Daniel Lockyer
4c13f188ce Removed Collections code from Admin
ref https://linear.app/ghost/issue/ENG-1805/remove-collections-code

- we're removing this feature as it's not finished to the degree we
  would like, so this commit removes all references to it from Admin in
  order to keep things clean
2024-12-04 17:36:40 +01:00
Sodbileg Gansukh
ea0e598bf2
Added custom fonts feature check (#21738)
ref DES-1011

- previously, we were hiding the old font settings from the official themes without checking if they support the custom fonts or not
- now we use the gscan warning info to check this — only when there's support, we hide the settings which means users with the older version will get the old settings back
- also added two new tests for this procedure
2024-12-04 13:42:44 +08:00
Ronald Langeveld
7c1d7080e9
Bumped comments-ui to 0.24.1 (#21797)
ref PLG-293
2024-12-04 02:48:20 +00:00
Ronald Langeveld
55dc9d997f
Added loading state when ordering comments (#21788)
PLG-280

- Added a loading state implementation when changing the ordering of
comments.
- This improves the overall UX particularly with slower connections.
- Due to the nature of how comments and ordering are handled, we
approached it with a simple state that determines whether it's done
loading or not around the API query.

---------

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
2024-12-04 10:16:58 +08:00
Sanne de Vries
0757f270eb
Updated hidden/removed comment copy on API side (#21796)
REF
https://linear.app/ghost/issue/PLG-295/change-copy-for-replied-to-[hiddenremoved]
- Updated the copy from hidden/removed to removed on API side and in
i18n context.json for consistency
2024-12-03 19:05:42 +00:00
Sanne de Vries
4fa929e1c4
Fixed z-index issue of sorting dropdown and hidden comments (#21793)
REF
https://linear.app/ghost/issue/PLG-292/sorting-dropdown-z-index-issue-with-hidden-comments
- The dropdown would appear behind hidden comments
2024-12-03 17:04:00 +00:00
Sanne de Vries
99d5dea877
Updated copy for replied-to reference of removed comments (#21792)
REF
https://linear.app/ghost/issue/PLG-295/change-copy-for-replied-to-[hiddenremoved]
- No distinguishing needed between hidden and removed comments, which is
the same to the reader. "Removed" is more simple and understandable.
2024-12-03 16:57:50 +00:00
Steve Larson
79fb7ee787
Bumped Portal (#21704)
ref https://linear.app/ghost/issue/ONC-613
2024-12-03 08:41:12 -06: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
Kevin Ansfield
badd6d8f97 Shipped comments-ui@0.24.0
no issue

- bumped minor to delay comments-ui update until next Ghost release
- includes numerous styling fixes, display of replies when editing a comment, and updates to in-reply-to snippets when deleting/hiding comments
2024-12-02 23:37:44 +00:00
Kevin Ansfield
9da9757f1f
Changed in-reply-to snippet to show [hidden/removed] (#21731)
closes https://linear.app/ghost/issue/PLG-263/

When hiding a reply as an Admin, if there were other replies that referenced it then those snippets would still show the hidden content because there was no immediate update in the comments-ui client. This made it look like hidden content would still be visible even though at the API level snippets were entirely removed so no other user would see it.

- added client-side handling so in-reply-to snippets immediately show `[hidden/removed]` which means we don't have to fetch every reply from the API
- updated the API to use `[hidden/removed]` as the snippet when referencing a hidden reply instead of removing all `in_reply_to_` data
  - keeping `in_reply_to_id` and `in_reply_to_snippet` means comments-ui still displays the replied-to reference text (albeit not directly showing the API-supplied string so `[hidden/removed]` can be translated)
  - returns the full `in_reply_to_snippet` text for Admin API requests so that showing a comment that has been loaded from the API can immediately show the contents for any displayed references to the comment
2024-12-02 23:12:01 +00:00
Sanne de Vries
4e806f7de4
Ensured replies remain visible when parent comment is being edited (#21756)
REF https://linear.app/ghost/issue/PLG-274/

- Currently, replies are hidden when the parent comment is being edited. This PR ensures that replies remain visible when the parent comment is being edited.
- To achieve this, the `CommentComponent` now checks if the parent comment is being edited. If so, the comment content is swapped by the EditForm, while the comment's avatar, header, menu, and replies remain visible.
- The Form component now only renders the FormEditor. A FormWrapper component is used to wrap the avatar and comment header.
- This Form component is used in the EditForm without the FormWrapper, as it is already wrapped in the CommentComponent.
- The ReplyForm and the MainForm use the FormWrapper.
- The Avatar component now also accepts a `member` prop, which is used to display the avatar image. This is because it's no longer used inside the Form component.
2024-12-02 22:17:15 +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
Sanne de Vries
5c3e26351a
Change blockquote border color to accent color (#21780)
REF
https://linear.app/ghost/issue/PLG-291/add-support-for-blockquote-border-in-darkmode
- The border color was invisible in dark mode. Instead of adding a white
border for dark mode, it now uses the accent color. This matches link
and buttoncolors in comments, and makes it stand out more.
2024-12-02 15:45:58 +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
Hannah Wolfe
675b29a418
🔥 Removed UI for AMP (#21762)
closes
https://linear.app/ghost/issue/ENG-1807/further-deprecate-amp-by-removing-the-ui

- AMP has been deprecated for a year, and will be removed in Ghost 6.0
- As the next step towards removing it, we're removing the UI, meaning
new sites can't enable it
- This will hopefully help the transition to dropping it be smoother and
especially prevent newer users from spending a lot of time on AMP in the
run up to it going away
- NOTE: this only removes the UI. All the logic remains, you can still enable AMP via the API/settings table in the DB.
2024-12-02 12:12:52 +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
Daniel Lockyer
f6d774ee93 Removed Lexical multiplayer experiment
fix https://linear.app/ghost/issue/ENG-1804/remove-lexicalmultiplayer-code

- this experiment never went anywhere and we'll probably change our plan
  in the future, so this commit cleans up all the relevant code in this
  repo for the feature, in order to cut down on the code we have
2024-11-28 16:00:10 +01: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
Princi Vershwal
6a70ba8895
Moved staff2fa flag to BETA_FEATURES (#21749)
Closes https://linear.app/ghost/issue/ENG-1800/move-staff2fa-to-beta-features-and-disable-developer-experiments

Currently we have this flag in ALPHA_FEATURES. We want to enable 2fa for selected sites but we would want to disable developer experiments for them, so they don't see the UI and enable random things.
2024-11-28 12:13:59 +00:00
Daniël van der Winden
30a0018c15
🐛 Fixed unclear newsletter (un)subscribe modal (#21739)
fixes
https://linear.app/ghost/issue/DES-953/newsletter-unsubscribe-modal-is-unclear-leading-to-repeated

Previously, when clicking 'Unsubscribe' in an email, landing on this
modal it was unclear what had just happened if you didn't read the text
below the title, causing people to click the toggles repeatedly.

We've now added a toast notification to make it clear what has just happened,
and if you click the toggles, the notification also shows.

Ideally, we'd be able to stack these notifications in case you hit
multiple toggles in quick succession, but that's going to be a separate
issue, as—to achieve that—it needs to be rewritten more significantly.

---------

Co-authored-by: Sodbileg Gansukh <sodbileg.gansukh@gmail.com>
2024-11-28 10:42:43 +01:00
Ronald Langeveld
72125f352b
Removed blocking tests (#21747)
ref https://ghost.slack.com/archives/C02G9E68C/p1732783603483239

- Need to create a patch release, however this test is suddenly failing.
- Fails at  const fileChooserPromise = page.waitForEvent('filechooser');
- reason is not clear, however, cannot reproduce.
2024-11-28 09:16:34 +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
Sanne de Vries
029177fa69
Fixed delete button being clickable multiple times (#21736)
REF
https://linear.app/ghost/issue/PLG-287/fix-double-click-on-delete-button-impacting-comment-count
2024-11-27 12:43:30 +01:00
Sanne de Vries
52d15cf955
Updated comments spinner style for light mode sites (#21734)
REF
https://linear.app/ghost/issue/PLG-272/look-into-potential-spinner-regression
2024-11-27 10:55:40 +01:00
Kevin Ansfield
04f337e085 Fixed comments-ui tests not properly mocking actions on replies
no issue

- `MockedApi.browseComments` only worked on top-level comments, it couldn't find replies when passed `filter:'id:123'` such is used when liking and editing replies
- fixed missing get handler for fetching single comment via Admin API (used after showing a hidden comment)
- added `flattenComments` and `findCommentById` helper functions to facilitate easier finding of a comment or reply within the nested structure
- added tests for liking and hiding replies
2024-11-26 18:34:02 +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
Kevin Ansfield
cdea73b873 Refactored comments-ui admin moderation tests
no issue

- expanded e2e test behaviour to route Admin requests through our MockedApi instance so we have the same test experience for normal and admin comments requests
- extracted page route method bodies to enable request methods to be spied on
- updated admin moderation tests to properly use admin requests
2024-11-26 14:30:23 +00:00
Sanne de Vries
6c064b73e4
Fixed spinner being invisible in light mode (#21727)
REF
https://linear.app/ghost/issue/PLG-272/look-into-potential-spinner-regression
2024-11-26 14:00:23 +01:00
Ronald Langeveld
781bfdd60f
Wired up admin api for hidden comments (#21724)
ref PLG-270

- Updated the getCommentByID service to filter out hidden and deleted
replies.
- Ensured all replies are loaded before applying the filter.
- Simplified logic to handle non-paginated routes by directly removing
unwanted replies.
- Wired up new Admin Endpoint that shows hidden replies but not deleted
replies.
- Updated comments-ui client
- Added unit tests for mocking apiClient event listeners.
- added eventlistener playwright tests to ensure it fires on UI clicks.
2024-11-26 16:56:17 +08:00
Sanne de Vries
5b70c7d1d7
Improved vertical indentation alignment (#21718)
REF
https://linear.app/ghost/issue/PLG-275/improve-vertical-indentation-alignment
2024-11-25 14:39:17 +00:00
Sanne de Vries
5e42c3146d
Improved disabled state for "Add comment" button (#21717)
REF
https://linear.app/ghost/issue/PLG-281/change-button-to-being-disabled-without-input
2024-11-25 13:12:49 +00:00
Sanne de Vries
8371b6699f
Added confirmation popup for comment deletion (#21715)
REF
https://linear.app/ghost/issue/PLG-285/add-confirmation-modal-upon-comment-deletion
2024-11-25 12:04:31 +00:00
Sanne de Vries
2d9b593844
Added hover styles to comment context menus (#21714)
REF https://linear.app/ghost/issue/PLG-283/add-hover-state-to-menu-items
2024-11-25 11:41:10 +00:00
Sanne de Vries
1a0a36b64c
Changed click target for comment replied-to ref (#21713)
REF
https://linear.app/ghost/issue/PLG-282/change-click-target-for-replied-to-reference
2024-11-25 11:34:40 +00:00
Sanne de Vries
ac3467165d
Updated "Replied to comment" copy (#21711)
REF
https://linear.app/ghost/issue/PLG-278/update-replied-to-comment-copy
2024-11-25 11:10:00 +00:00
Kevin Ansfield
d204d67d1f Cleaned up comments-ui actions test setup duplication
no issue

- repeated use of the same init data made tests longer than they needed to be, especially as the number of tests grows
- added `initializeTest()` function to remove unnecessary duplication
2024-11-25 10:52:31 +00:00
Sanne de Vries
f06a766189
Replaced reply icon in comments-ui (#21710)
REF https://linear.app/ghost/issue/PLG-271/replace-reply-icon
2024-11-25 08:59:19 +00:00
Ronald Langeveld
253e596138
Reverting 2 commits (#21709)
no issue

- need to add an additional change.
2024-11-25 08:58:06 +00:00
Ronald Langeveld
6c3753f403
Bumped comments-ui to a new minor (#21708)
no issue

- Bumping to a new minor due to API changes.
2024-11-25 08:42:31 +00:00
Ronald Langeveld
31a80cf9b8
Fixed hidden/deleted replies in getCommentByID (#21707)
ref PLG-270

- Updated the getCommentByID service to filter out hidden and deleted
replies.
- Ensured all replies are loaded before applying the filter.
- Simplified logic to handle non-paginated routes by directly removing
unwanted replies.
- Wired up new Admin Endpoint that shows hidden replies but not deleted
replies.
- Updated comments-ui client.
2024-11-25 08:15:08 +00:00
Steve Larson
673e316580
🐛 Fixed unsubscribe all link in Portal sometimes failing (#21703)
ref https://linear.app/ghost/issue/ONC-613/

A little while back we changed to requiring a key when interacting with
member endpoints that are not authenticated. One request code path in
Portal was missed, causing some requests to fail. This should patch that
hole.
2024-11-24 01:10:25 +00:00
Cathy Sarisky
ebd98d005a
🐛 fix Windows bug with the admin file upload widget (#21687)
closes #21439

On Windows 10/Chrome (but maybe nowhere else?), attempting to drag a
file into any of the drop targets in the admin panel resulted in
flickering behavior, and generally dropping didn't actually trigger the
upload.

I thought originally it was a problem with the size of the drop target,
but it actually appears to be a rerender bug. In brief, handleDragging
and handleStopDragging were firing repeatedly, and each fire triggered a
rerender, that added or removed a div from the file upload widget.

I suspect some browser-specific difference in how drag events fire is to
blame.

This PR moves the logic to change the classes applied to the div, rather
than changing whether the div is present.

I have manually tested with Windows 10 in the users import, theme
import, and content import widgets. Styles are preserved (although I
think they could be improved, as the grey outline is really faint) and
uploading now works consistently, instead of mostly triggering display
of the raw file most of the time.
2024-11-22 17:21:00 -06: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
Kevin Ansfield
0ac36bd324 Shipped comments-ui@0.22.4
no issue

- includes fix for reply-to-reply form not showing when parent comment is hidden
2024-11-21 18:49:18 +00:00
Kevin Ansfield
d1019a8e54 Fixed reply-to-reply comment form not showing when parent is hidden
closes https://linear.app/ghost/issue/PLG-266

- the reply form is a child of the parent comment component but we have different comment components for published vs unpublished with the bug coming from the latter missing the logic to display the form
- added missing form display and added a regression test
2024-11-21 18:44:23 +00:00
Steve Larson
c046bbda91
🐛 Fixed Istanbul timezone (#21686)
ref https://linear.app/ghost/issue/ENG-1781/
- updated Istanbul TZ to +03

Thanks to @muratcorlu for the PR to TryGhost/SDK.
2024-11-21 17:23:21 +00:00
Kevin Ansfield
e5a21aaf54 Shipped comments-ui@0.22.3
no issue

- includes fix for missing progress indicator when submitting forms
2024-11-21 16:12:31 +00:00
Kevin Ansfield
0b806cc01b 🐛 Fixed missing progress indicator when submitting comments
closes https://linear.app/ghost/issue/PLG-265

- wrapped the async part of `dispatchAction` in a Promise so code that calls it can await the action completion
  - this was a regression introduced a long time ago when we switched to Typescript and React hooks
- added a `setDelay()` method to our `MockedApi` class to make it easier to test interstitial loading states
2024-11-21 16:03:30 +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
Sodbileg Gansukh
9493fbefcc
Moved the custom fonts feature to public beta (#21664)
ref DES-985
2024-11-21 19:06:40 +08:00
Ronald Langeveld
4202cf137e
Bumped Comments-UI to 0.22.2 (#21678)
no issue
2024-11-21 11:04:41 +00:00
Ronald Langeveld
cf6884d098
Wired up Admin Comment Endpoints to UI (#21661)
ref PLG-227

- Updated logic that allows Admin Users on comments to interact with
some endpoints from a specific admin-only route.
- It pulls 2 admin specific routes:
- 1. an admin specific 'browse' route that includes hidden comments that
would otherwise be hidden from regular users and members.
- 2. A specific replies route, that would also include hidden comments
- This was needed in order to get accurate pagination.

- Additionally, it wires up the routes via `message-handler` that deal
with the potential cors issues.
- Includes style updates

---------

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2024-11-21 10:52:36 +00:00
Sodbileg Gansukh
1f501c1e58
Added author name as an additional check for official themes (#21665)
ref DES-982

- we're hiding font-related theme settings from official themes to make room for the new custom font settings
- this adds author name as an additional check on top of the existing ones (theme name and corresponding setting keys)
2024-11-21 12:04:24 +08:00
Kevin Ansfield
33709e7d0c Shipped comments-ui@0.22.1
no issue

- includes updated timestamp formatting
2024-11-20 15:30:53 +00:00
Sanne de Vries
ea1b786136
Updated timestamp format for comments (#21515)
ref https://linear.app/ghost/issue/PLG-235

- Any comments older than yesterday are now shown with the date instead of relative time
- Comments from the current year are now shown with just the month and day

---------

Co-authored-by: Kevin Ansfield <kevin@ghost.org>
2024-11-20 15:25:49 +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
Kevin Ansfield
46bdbaa3b8 Shipped comments-ui@0.22.0
no issue

- includes updates behind `commentImprovements` flag
- bumped to 0.22 to avoid changes going live before next Ghost release
2024-11-20 12:33:53 +00:00
Sanne de Vries
5bbb98b661
Hooked up the CTA popup to the reply button (#21663)
REF
https://linear.app/ghost/issue/PLG-262/unhide-the-reply-button-when-comments-is-paywalled
- Previously, the reply button was hidden when the comments were
paywalled. Now, the button is visible and triggers a signup or upgrade
popup.
2024-11-20 10:10:50 +01:00
Kevin Ansfield
52e727a28c
Added in-reply-to references to comments-ui (#21656)
ref https://linear.app/ghost/issue/PLG-230

When clicking "Reply" on a reply we now show an "In reply to" reference on the form and when saved show that reference in the rendered view, making it easier to follow discussions within comment replies.

- updated calls to `openCommentForm` action when opening a reply to add the in-reply-to data to the `openForm` instance
- updated Form comment to use the `openForm` instance data when rendering the in-reply-to reference
- updated Comment component to render the in-reply-to reference from the API-provided data
  - includes click handler to scroll to the referenced comment
- added `getCommentInReplyToSnippet` helper function so strip a comment back to plaintext for display in the reply-to reference on the comment form (snippets on other comments are generated server-side)

---------

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
2024-11-19 17:30:18 +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
Steve Larson
2447f37a14
Reverted custom fonts flag (#21645)
ref https://ghost.slack.com/archives/C025584CA/p1731950126867179

- moved custom fonts functionality back to a labs flag
- reverted gscan version to 4.45 which doesn't include the custom fonts
checks/warnings
2024-11-18 17:45:03 +00:00
Sanne de Vries
0d417a5859
Updated hide comment button to be red (#21641)
REF
https://linear.app/ghost/issue/PLG-239/indicate-that-youre-an-admin-in-ui
2024-11-18 13:10:06 +01:00
Kevin Ansfield
5ef30dbb3c Shipped comments-ui@0.21.10
no issue

- includes fix for incorrect avatar showing in comment reply forms
2024-11-18 11:36:35 +00:00
Kevin Ansfield
49595dce0f 🐛 Fixed avatar on comment reply form not showing your avatar
closes https://linear.app/ghost/issue/PLG-260
ref https://github.com/TryGhost/Ghost/pull/21621

- in a recent refactor, a `comment` prop started being passed through to `<Form>` inside of `<ReplyForm>` which had an unexpected side-effect of changing the avatar image to the comment's member instead of the logged-in member
- removed the prop passthrough and updated test to catch future regressios
2024-11-18 11:30:48 +00:00
Steve Larson
7ff02f46ec
Bumped comments package (#21632)
no ref
- includes new translations
2024-11-15 19:12:58 +00:00
Steve Larson
888fdaacc2
Bumped signup form package (#21631)
no ref
- includes new translations
2024-11-15 19:11:29 +00:00
Steve Larson
f1cb2b8d60
Bumped portal and search packages (#21630)
no ref
- includes new translations
2024-11-15 19:10:29 +00:00
Kevin Ansfield
0ac587e94a
Refactored comments-ui form management (#21621)
ref https://linear.app/ghost/issue/PLG-230
closes https://linear.app/ghost/issue/PLG-256

Adding an in-reply-to reference link/snippet to reply forms was proving difficult with the previous setup due the amount of data that needed to be passed up and down a deeply nested component tree. This refactor lays the groundwork for making that easier and aims to make form autoclose behaviour more centralised by keeping the open form state in app context and the opening/closing of forms in actions so there's less need for messy local state and to drill functions down the component tree.

- replaces `openFormCount` context state with an `openCommentForms` array
  - keeping detailed open form references in the application state means the display of forms is centrally managed rather than managed via local state inside components
  - it simplifies some of the problems faced with the `<PublishedComment>` component that previously managed form display. That component is re-used for both the top-level comment as well as replies even though replying on a reply puts the top-level comment into reply mode meaning we had a mess of local state and passed-through functions to work around the component having varying behaviour depending on nesting level
  - `openFormCount` is still available on the application state via `useMemo` on the provider meaning the implementation of `openCommentForms` is hidden from app code that just needs to know if forms are open
- removes `<AutocloseForm>` as the autoclose behaviour is now controlled via the `openCommentForm` action
- updated `<Form>` so it manages the "has unsaved changes" properties on `openFormComments` ready for use by `openCommentForm`'s autoclosing behaviour
2024-11-14 18:26:23 +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
Ronald Langeveld
e254ddbd17
🐛 Fixed marketplace theme installation route (#21616)
no issue

- Fixes a potential regression that caused the marketplace install route
not to route correctly.
2024-11-14 03:41:47 +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
Kevin Ansfield
097394bd88 Fixed flaky avatar saturation test in comments-ui
no issue

- running tests locally, especially in UI mode, would often result in an avatar saturation test failing
- the cause was calculating saturation for an element that still had it's opacity animating in
- added a test util function that waits for an element in a frame to reach full opacity
- used function in test to ensure we have a stable element before calculating the color saturation
2024-11-12 17:10:44 +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
John O'Nolan
e7a80d79f3
Updated link to Pintura integration 2024-11-12 08:52:17 -05:00
Sodbileg Gansukh
9ffc5ca79a
Fixed embeddable signup form preview and generated code (#21592)
ref ENG-1671
2024-11-12 14:33:52 +08:00