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.
ref https://linear.app/ghost/issue/PLG-270/
If the API is returning replies that are not shown in the UI then the comments-ui app isn't able to paginate correctly. This should be true across all comments endpoints with no inconsistency across browse by page or comment, or when fetching individual comments.
- expectations for public comments endpoints:
- hidden/deleted comments are never returned unless they have published replies
- hidden/deleted replies are never returned
- expectations for admin comments endpoints:
- deleted comments are never returned unless they have published replies
- deleted replies are never returned
- hidden comments+replies are always returned (necessary to allow hidden comments to be toggled back to visible)
Fixed by:
- using bookshelf `withRelated` callback function for `replies` relation in `defaultRelations` (and again in `findPage` which uses `withRelations` to load relations individually)
- cleaned up now-unnecessary additional filtering in `CommentsService`
- added additional tests to ensure behaviour and lack of regressions
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
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.
no issues
- when anything is changed in the design system, the Admin-X Settings
checks will run now
- they didn't use to run before, and it caused some PRs to be merged
without being checked
ref DES-990
- previously, the publish flow was continued regardless of if there was an error while sending email
- now it correctly stays on the error state, and goes to the normal flow once the error is fixed and retried
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
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
closes https://linear.app/ghost/issue/ANAL-88/go-cookie-less
- This is still an experimental feature
- Using localstorage removes the need for a session cookie
- This in turn removes the need to have a cookie banner
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.
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.
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
The Dutch translation of the "Comment"-button in newsletters was very
formal. This new translation improves that, and more closely matches
Ghost's tone of voice.
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.
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.
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>
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.
fix https://linear.app/ghost/issue/ENG-1502/handle-malformed-client-versions-to-avoid-versionmismatcherror
- in the event we pass a client version that is invalid (ie, anything
that doesn't resemble semver version), we currently throw a
VersionMismatchError
- this is slightly misleading because although it is a version mismatch,
it moreso that it's an invalid string to pass in this header
- to fix that, we can just use `validRange` from `semver` to detect
this, and throw a BadRequestError with a meaningful error message
- this helps us detect whether the header is actually a version
mismatch, or an invalid input
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
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
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.