Commit Graph

39978 Commits

Author SHA1 Message Date
Ghost CI
7cfb755bbd v5.101.4 2024-11-25 07:22:27 +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
Steve Larson
588979e62f
Added Sentry logging in editor for incorrectly untitled slug values (#21682)
ref https://linear.app/ghost/issue/ONC-548/

We seem to occasionally get into a state where draft posts are stuck
with an untitled slug, which has been difficult to reproduce. It would
be helpful to gather some data on how frequently this is happening.
2024-11-23 00:25:18 +00:00
Steve Larson
7083bd0628
🐛 Fixed slug not always updating for draft posts (#21691)
ref https://linear.app/ghost/issue/ONC-548/

There have been reported cases of the editor not updating the slug for
draft posts. The logic should be as follows: for a draft post, if the
title was updated and we do not detect a custom slug, update it.

This got out of sync due to actions where the save was triggered but the
title onBlur effect (which updates the slug) was not triggered. This has
been resolved by evaluating the slug in the before save actions.
2024-11-23 00:24:17 +00:00
echobilisim3421
3277da7140
Updated Turkish translation in search.json (#21554)
no ref
2024-11-22 23:38:16 +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
Hannah Wolfe
2016e6a6df
Removed TTL from tinybird analytics_events datasource (#21697)
ref https://linear.app/ghost/issue/ANAL-115/data-retention

- The bad news here is I didn't notice that the tinybird web analytics
starter kit included a TTL on the analytics_events datasource of 60 days
- This means any data older than 60days was automatically dropped from
the table
- I updated this in the UI when I noticed it a few days ago, this makes
sure it can't come back
- The good news is that we don't have to implement anything to make this
work when we do get to the point where we want a TTL!
2024-11-22 15:52:28 +00:00
Chris Raible
d89c7d5f25
Added metric for time to create a database connection (#21696)
ref
https://linear.app/ghost/issue/ENG-1783/add-time-to-create-connection-metric

- Since we've added the "time to acquire" metric to get visibility into
contention in the connection pool, we've seen some anomalies where it
takes a surprisingly long time to acquire a connection (~60ms) when not
under load. Hypothesis is that these anomalies occur when there aren't
any open connections, so Ghost has to establish a new connection with
the DB, and that's the part that's actually taking most of that time.
This new metric should help confirm/deny that hypothesis.
- This will also be an interesting metric to keep an eye on and/or alert
on — if Ghost can't create new connections with its database
performantly, it's not going to perform very well.
2024-11-22 00:26:04 -08:00
Chris Raible
2ff82c7ac0
Configured prometheus client to reuse TCP connections to the pushgateway (#21695)
ref
https://linear.app/ghost/issue/ENG-1796/reuse-tcp-connections-when-sending-metrics-to-the-pushgateway

- When we rolled out the prometheus metrics collection, it overwhelmed
the pushgateway. Our hypothesis is that Ghost was creating too many new
TCP connections to the pushgateway.
- The prometheus client was creating a new connection with the
pushgateway each time it pushed metrics every 15 seconds.
- This commit changes the prometheus client to keep the connection
alive, and re-use it instead of creating a new one.
- It also limits the number of retries if pushing the metrics fails —
after 3 consecutive failures, Ghost will stop retrying and log an error.
2024-11-21 17:43:33 -08:00
Chris Raible
829a0fc7e9
Added email analytics throughput metrics (#21694)
ref
https://linear.app/ghost/issue/ENG-1508/add-custom-metrics-for-email-analytics-jobs

- With the experimental job queue, we're using email analytics as our
initial validation test case. We're hoping to see an improvement in
Ghost's throughput for ingesting email events. However, we don't
currently collect this data point, so it's kind of impossible to tell
right now if the job queue is making things better or not.
- This PR fixes that by adding two new prometheus metrics:
- `email_analytics_events_processed` — a counter incremented each time
an event is processed. Sometimes the event has already been processed in
the past, so this doens't always result in a new event being stored in
the DB.
- `email_analytics_events_stored` — a counter incremented each time an
event is stored in the DB. For example, if an email is opened 3 times by
the same recipient, this counter will only be incremented once.
- The metrics also have a label for the event type, so we can split out
opened events from delivered events. We can use the `rate()` function in
grafana to then get an `events ingested per second` metric, and compare
sites with/without the job queue enabled.
2024-11-21 17:30:43 -08:00
Steve Larson
48839c80ae
Added updated lock file for timezones bump (#21690)
ref c046bbda91
2024-11-21 20:04:08 +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
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
Fernanda Thiesen
db52ebb366
🌐 Updated pt-BR translations (#21636)
no ref

Suggestions for updating the confirmation email pt-BR translation with
more everyday terms and addressing gender-specific issues by using 'no
site' instead of 'em'.
2024-11-21 18:37:17 +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
renovate[bot]
b098fb69be
Update dependency mailgun.js to v10.2.4 (#21685)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [mailgun.js](https://redirect.github.com/mailgun/mailgun.js) |
[`10.2.3` ->
`10.2.4`](https://renovatebot.com/diffs/npm/mailgun.js/10.2.3/10.2.4) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/mailgun.js/10.2.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/mailgun.js/10.2.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/mailgun.js/10.2.3/10.2.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/mailgun.js/10.2.3/10.2.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>mailgun/mailgun.js (mailgun.js)</summary>

###
[`v10.2.4`](https://redirect.github.com/mailgun/mailgun.js/blob/HEAD/CHANGELOG.md#1024-2024-11-21)

[Compare
Source](https://redirect.github.com/mailgun/mailgun.js/compare/v10.2.3...9ab89f6f6e00a9bac87a987410b810d6c9d3a5d4)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekday" (UTC), Automerge - At
any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/TryGhost/Ghost).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzkuMTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-21 16:54:50 +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
echobilisim3421
368a8eb2f8
🌐 Updated Turkish translations in comments.json (#21670)
no ref

Added missing Turkish translations
2024-11-21 15:23:12 +00:00
Cathy Sarisky
a31afd4b77
Made i18n more tolerant of missing files (#21561)
no ref

This fix adds an extra fallback to 'en' when a locale folder is missing one or more translation files, and a test for the fallback. Previously, Ghost would fail to boot if an expected file translation was missing.
2024-11-21 09:03:56 -06: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
Ronald Langeveld
49c0e60053
Fixed admin replies pagination to always sort old to new (#21679)
ref PLG-227

- added the correct order params for admin replies to ensure they are
sorted oldest to newest.
- hardcoded since we want to ensure it remains that way.
2024-11-21 11:38:47 +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
Ghost CI
703ed9dfbc Merged v5.101.3 into main 2024-11-21 09:19:10 +00:00
Ghost CI
a238960726 v5.101.3 2024-11-21 09:19:08 +00:00
Fabien O'Carroll
3265e257b7 Fixed webhooks not firing for internal integrations
ref https://linear.app/ghost/issue/AP-598

We want to make sure that webhooks for internal integrations are fired even
when the custom integrations limit has been hit. In order to test this we've
had to update the fixtureManager to allow passing the integration type when
inserting fixture webhooks into the db.
2024-11-21 16:01:33 +07:00
Fabien O'Carroll
263c493e2b Refactored webhook restriction to WebhookTrigger
ref https://linear.app/ghost/issue/AP-598

This is not a change in functionality.

The ActivityPub integration is an `internal` integration, because we want it to
be available regardless of the plan a Ghost(Pro) site is on. However the
webhooks service is not able to differentiate between webhooks for a custom
integration and an internal one.

Rather than disable webhooks entirely when the custom integrations limit
active, we want to allow webhooks for internal integrations to work. The first
step towards that is keeping the listener for the model events and have the
limiting happen in the WebhookTrigger which allows us to be more specific as to
which webhooks should be triggered or not.
2024-11-21 16:01:30 +07:00
Ronald Langeveld
d800587225
Added new endpoint for loading replies as Admin (#21676)
ref PLG-227

- Wired up a new endpoint that would be able to paginate replies as an
admin user.
- The difference compared to the members-api endpoint is that this
includes hidden comments and includes the html string which is normally
hidden from non-admin users
2024-11-21 14:55:59 +08:00
Ronald Langeveld
f0dab9dc9a
Include hidden comments for admins in pagination count (#21675)
ref PLG-227

- Ensure hidden comments are included in the replies count for admin
users to ensure pagination works as expected.
2024-11-21 12:53:37 +08: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
Ronald Langeveld
68d8262fab
Fixed member comments replies pagination (#21674)
ref PLG-227

- Changed replies count to exclude hidden and deleted replies to ensure
the accuracy of pagination data for members.
2024-11-21 03:53:26 +00:00
Fabien O'Carroll
19ab98f836 Fixed webhooks not firing for internal integrations
ref https://linear.app/ghost/issue/AP-598

We want to make sure that webhooks for internal integrations are fired even
when the custom integrations limit has been hit. In order to test this we've
had to update the fixtureManager to allow passing the integration type when
inserting fixture webhooks into the db.
2024-11-21 03:38:43 +00:00
Fabien O'Carroll
0919ae0d05 Refactored webhook restriction to WebhookTrigger
ref https://linear.app/ghost/issue/AP-598

This is not a change in functionality.

The ActivityPub integration is an `internal` integration, because we want it to
be available regardless of the plan a Ghost(Pro) site is on. However the
webhooks service is not able to differentiate between webhooks for a custom
integration and an internal one.

Rather than disable webhooks entirely when the custom integrations limit
active, we want to allow webhooks for internal integrations to work. The first
step towards that is keeping the listener for the model events and have the
limiting happen in the WebhookTrigger which allows us to be more specific as to
which webhooks should be triggered or not.
2024-11-21 03:38:43 +00:00
Steve Larson
c806cf665d
🐛 Fixed minifier for Windows users (#21311)
ref https://github.com/TryGhost/Ghost/pull/15893

This got closed as stale long ago. Resurrecting this as it's a simple
change and will help our Windows-based theme devs in particular.
2024-11-21 00:00:29 +00:00
Steve Larson
600b3c66ed
Bumped Koenig (#21672)
no ref
2024-11-20 21:03:11 +00: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
Steve Larson
c3e261627f
Updated analytics button logic for disabled newsletter emails (#21643)
ref https://linear.app/ghost/issue/ONC-594

We had a check to prevent showing the Analytics page link for email-only
posts (newsletters) if newsletters were disabled. I don't see a good
reason to remove this - users then have to re-enable newsletters just to
see the analytics.
2024-11-20 08:43:35 -06: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
Steve Larson
2a0fc6fd1e
Fixed picker for local tz use (#21658)
ref 47b8161805

This ended up inverting the behavior, such that TZs far in advance of
GMT fouled up. This change builds the date by date components in the
local TZ so we should not run into further trouble...
2024-11-19 15:54:50 -06:00
Chris Raible
05127ddc5c
Reorganized docker related files (#21650)
ref https://linear.app/ghost/issue/ENG-1782/move-docker-related-files-to-a-better-location-that-githubscripts

- The docker files are currently located in `.github/scripts`. This location doesn't make a lot of sense — you wouldn't think to look there unless you already knew they were there. This also requires you to specify the path to the `compose.yml` file whenever running a `docker compose ...` command. 
- This commit moves the `compose.yml` file to the root of the repo, so you can simply run `docker compose up` and it will automatically find the file in the root, without having to specify `-f .github/scripts/docker-compose.yml`. This is a major win for convenience over the current setup.
- It also moves all the related files, including the `Dockerfile` used by the Dev Container setup and configuration files for supporting services into a new `.docker` directory, which is a more logical location, and should be easier to find.
- Also updated the current convenience commands in the `package.json` scripts block (`yarn docker:reset` and `yarn docker:down`
2024-11-19 13:15:06 -08:00
Steve Larson
47b8161805
🐛 Fixed scheduled post datepicker marking prior day as selected (#21657)
ref https://linear.app/ghost/issue/ONC-590

When choosing dates to schedule a post in the future, it could end up
displaying the wrong selected date because it was accounting for local
TZ. This doesn't make sense as we're displaying the site TZ in the
picker itself, and that's the real TZ used for scheduling.

In short, this feels confusing and also is often incorrect/misleading,
even though the scheduler in the background is correct. This should
align those to make it more transparent.
2024-11-19 20:47:12 +00: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
Sparsh
b1a75833a1
🌐 Added Nepali locale for newsletter.json (#21635)
no ref

- Added all field translations from English to Nepali for
`newsletter.json` file.

"Thank you for creating Ghost and making it open source.": "Ghost
सिर्जना गरेर यसलाई ओपन सोर्स बनाउनु भएकोमा धन्यवाद।"
2024-11-19 08:31:57 -06:00