- Currently, stale bot is configured to mark issues as stale after 120 days, and close them 7 days later
- The intent is to close anything 4 months old or more, so setting the timer to 113 days means it accounts for the extra 7
Closes https://linear.app/ghost/issue/ENG-1758/product-row-locking-in-linksubscription-causes-slowness-in-high-signup
- The method used a FOR UPDATE query when fetching the Ghost product despite never updating that row.
- In this case, we're only reading the default product to link it with a subscription - we're not actually modifying the default product itself. The operation is read-only in nature, therefore, the forUpdate lock is unnecessary
- The actual update to the product happens later in the code when we call this._productRepository.update() with the stripe price data, and that operation has its own transaction handling and locking mechanisms
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
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>
ref https://github.com/TryGhost/Ghost/pull/21765
- This change was split out of
https://github.com/TryGhost/Ghost/pull/21765
- We're adding versioning to all the resources in tinybird so that we
can iterate on them in future in a way that tinybird understands
- The next step is to build an example of what making a change will look
like in versioned world
---------
Co-authored-by: Paco Gonzalez <paco@tinybird.co>
- This changes the Tinybird Materialized Views to circumvent a currently
existing Tinybird bug that prevents iterating the code in its current state.
- The idea is that this will allow us to be more flexible in making changes, as it works
around some restrictions where Tinybird won't let us change the MV because other
parts of the pipe depends on it
- The idea is to remove the dependency to `analytics_hits.pipe` in the
materialized views.
- This does create code duplication, but we can clean that up later using includes,
or refactor the pipe again later if Tinybird fixes the issues
---------
Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
ref https://linear.app/ghost/issue/ENG-1811/
- added first migration for truncating column length; required in order
to be able to add an index
- added second migration for creating the index
After sending a newsletter, Ghost can struggle with the amount of
incoming traffic (particularly link scanners) with particularly large
pools of recipients. Part of this is link lookup, which an index has
shown to help with when added manually on the db. Given that, this
change is to make it native.
I ran a stats service query to gather data on usage, as well as did code
review, and I've not seen any use of this table that isn't using the 8
digit slug, i.e. /r/12345678, or 11 characters total. I made this 191 in
case that use case changes, while still allowing us the value of an
index.
Note: SQLite does not support altering columns to my knowledge, so we
have to create a temp table with the new column data to push back in.
This should be ok because use of SQLite should be limited. In the past,
I've seen migrations skipped for SQLite and I'd rather not do that here
if able.
closes https://github.com/TryGhost/Ghost/issues/14882
ref
https://github.com/TryGhost/Ghost/issues/14882#issuecomment-2395498636
- As per the comment on the issue, the last reference to bluebird in
Ghost itself was removed over a year ago.
- We added this code blocking bluebird debug over 6 years ago.
- We do still use bluebird through dependencies so we could still have
memory issues BUT
- This change only affects development, and really should not be a
problem anymore.
- Leaning towards deleting the weird old edge-case code as it should not
be an issue, and finding out the hard way if I'm wrong :D
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.
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
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
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.