Commit Graph

20989 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Princi Vershwal
d17f52df9d
🐛 Fixed words breaking to new line in emails on mobile (#21652)
fixes https://linear.app/ghost/issue/DES-977/word-breaks-to-new-line-on-mobile-for-new-member-sign-up-email

- word-break is not required in the text "You can also copy & paste this URL into your browser:", so removed it
- word-break should be used in case of urls. No change in this
- Observed this patter across multiple email templates. Fixed all.
2024-11-19 10:43:32 +00:00
Aileen Booker
b177c7af43 Allowed transistion to settings when in forceUpgrade is active 2024-11-19 05:28:46 -05:00
Kevin Ansfield
2163fd5db3 Fixed missing in_reply_to_snippet for replies
ref https://linear.app/ghost/issue/PLG-230

- the `inReplyTo` relationship was not being loaded for replies which meant the mapper never hit the code which adds `in_reply_to_snippet`
- moved all `in_reply_to` code behind the `commentImprovements` labs flag
- updated tests to correctly disable/enable the flag
- added test for browsing comments with replies-to-replies so `in_reply_to_snippet` is captured in the snapshot
2024-11-18 21:35:40 +00:00
Princi Vershwal
527fb05a29
Fixed staff member login when 2FA is ON (#21647)
Fixes
https://linear.app/ghost/issue/ENG-1775/staff-users-are-not-able-to-verify-session-if-2fa-flag-is-on
2024-11-18 18:43:23 +00:00
Ghost CI
6eae395b24 Merged v5.101.2 into main 2024-11-18 18:14:43 +00:00
Ghost CI
d41ccdde8d v5.101.2 2024-11-18 18:14:42 +00:00
Steve Larson
34d267decc 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 11:53:29 -06: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
Princi Vershwal
f2444b08f3
Added e2e test for sending invite to a staff member and user signing up using the invite link (#21637)
Fixes
https://linear.app/ghost/issue/ENG-1702/add-e2e-browser-test-for-staff-invite-and-accept-flow
2024-11-18 15:30:03 +00:00
Ghost CI
254acb3b86 v5.101.1 2024-11-15 19:32:06 +00:00
Mostafa Elsayed Hussin
5c969dcf21 🌐 Added Arabic locale (#21590)
no ref

Arabic locale done for search, comments, newsletter . once pulled I'll start translating the portal.

This translation is a part of ACLSS efforts to translate more open source projects to Arabic.
2024-11-15 13:17:42 -06:00
Oren Cohen
ea05d1d8c7 🌐 Added Hebrew translations (#17056)
no ref

Added most no-brainer Hebrew translations but left the more complicated ones to people better equipped to translate them. Better something than nothing at all.

Also, Hebrew is an RTL language, so exclamation points and dots at the end of a sentence should appear at the leftmost part, but the translation files are LTR, as all JSON files are. Just putting it out there. This should be considered when using an RTL language translation.

---------

Co-authored-by: Steve Larson <9larsons@gmail.com>
2024-11-15 13:17:42 -06:00
Duy
8746de04b7 🌐 Updated Vietnamese translations (#21581)
no ref

- Changed _"Gói theo dõi"_ to _"Gói thành viên"_ for a better match to
the grammar and correct usage in Vietnamese
- Clarified the definition of **Subscription plan** (_"Gói thành viên"_
instead of _"Gói"_)
- Removed plural **emails** because it is not logical in Vietnamese
- Added _"Sort by"_ in comment.json
- Added _"Sorry, no recommendations are available right now."_ in
portal.json
- Changed placeholder text "and" to "&" for shorter and show full
sentence (mobile) in search.json
2024-11-15 13:17:42 -06:00
Steve Larson
842adcdc80 Added metrics for job queue and email analytics (#21626)
no ref

Added Prometheus metrics for the job queue throughput and email analytics throughput. We'll likely keep these around as good metrics to keep an eye on, though for the moment their primary function is to establish a baseline for users w/o the job queue enabled so we can observe the full impact once switching it on.
2024-11-15 13:17:42 -06:00
Lukas Kocourek
e079ebb3de 🌐 Added Czech translations for newsletter & search (#21516)
no issue
2024-11-15 13:17:42 -06:00
Sparsh
c292a5a110 🌐 Added Nepali locale for Ghost (#21552)
no ref

- [x] Created a new folder `ne` based on locale code for Nepali locale
inside `ghost/i18n/locales/`
- [x] Cloned 6 new JSON files pertaining to `en` folder from English
locale.
- [x] Added all field translations from English to Nepali for
`ghost.json` file.
- [x] Added all field translations from English to Nepali for
`search.json` file.
- [x] Added all field translations from English to Nepali for
`signup-form.json` file.
- [ ] TODO: Remaining 3 other files viz. `comments`, `newsletter`, and
`portal`.


"Thank you for creating Ghost and making it open source.": "Ghost
सिर्जना गरेर यसलाई ओपन सोर्स बनाउनु भएकोमा धन्यवाद।"
2024-11-15 13:17:42 -06:00
Fernanda Thiesen
cec25e7b4a 🌐 Added pt-BR translations (#21612)
no ref

Suggestion to update the translation for 'A label for the thumbs-up response in member feedback at the bottom of emails' to 'I like it' and 'I don't like it,' as this phrasing sounds better and is more appropriate in Brazilian Portuguese. Thank you.
2024-11-15 13:17:42 -06:00
Ghost CI
0f64ec9dad v5.101.0 2024-11-15 15:05:41 +00:00
Ghost CI
12b0cd269f 🎨 Updated Source to v1.4.0 2024-11-15 15:05:41 +00:00
Ghost CI
e77e2190bf 🎨 Updated Casper to v5.8.0 2024-11-15 15:05:41 +00:00
Chris Raible
431719080e
Added prometheus metric for time to acquire connection (#21628)
ref
https://linear.app/ghost/issue/ENG-1769/improve-pool-utilization-metric

- Currently the connection pool metrics are all point in time metrics,
and with a scrape interval of 15s this doesn't tell us a whole lot about
what's happening in the pool.
- This commit adds a Summary metric to track the elapsed time each
transaction has to wait to acquire a connection from the pool, which
should be a good indication of contention in the pool.
- Also moved the call to `prometheusClient.instrumentKnex` to after `initCore` in the boot process, because the metric depends on event listeners on `knex.client.pool`, and the pool gets destroyed and recreated in `initCore`, which removes the listeners
2024-11-14 21:14:40 -08:00
Chris Raible
015b881bc1
Removed the metrics server from Ghost (#21629)
no issue

- Since we decided to use the pushgateway instead of running a metrics
server, this removes the metrics server and its e2e tests
- We may reintroduce it later, but for now this is a simpler setup
2024-11-15 03:39:12 +00:00
Chris Raible
3728a4eaea
Refactored prometheus metrics instrumentKnex method (#21627)
no issue

- The `instrumentKnex` method was directly accessing the `promClient`
instance to create custom metrics, and keeping track of them manually in
a `customMetrics` map. This isn't necessary, since the metrics are all
tracked within the `promClient` instance's registry. This method now
uses the `prometheusClient.register...()` methods to create the metrics,
and retrieves them with the `getMetric()` method to reduce duplication
of work and manual bookkeeping
- This also removes the query count metric, as there is a count already
included in the query duration Summary metric
2024-11-14 16:57:55 -08:00
renovate[bot]
0aae3bb1fc
Update dependency gscan to v4.46.0 (#21617) 2024-11-14 20:10:03 +08:00
Sodbileg Gansukh
462fe9c12b
Updated the valid theme fixture (#21619)
no issues

- with gscan v4.46.0, we introduced a new rule for the custom fonts
feature
- this updates the valid theme zip file to make the theme tests work
with the new rules
2024-11-14 19:43:27 +08:00
Chris Raible
5a3b1d6cf8
Ensured prometheusClient is not initialized unless enabled via config (#21615)
no issue

- Currently the prometheus client is only initialized on boot if enabled
via config, but if it's required in other files (i.e. to create a custom
metric) it will be initialized then
- This commit explicitly checks if the prometheus client is enabled via
config before initializing it, thus preventing it from being initialized
when disabled
2024-11-13 18:34:36 -08:00
Chris Raible
6d9ea91634
Added utilities for creating custom prometheus metrics (#21614)
ref
https://linear.app/ghost/issue/ENG-1771/add-utility-functions-to-easily-create-custom-metrics

- Currently adding custom metrics to our prometheus client requires you
to directly access the `prometheusClient.client` to create the metrics
- This isn't super convenient, as you then have to either keep the
metric in a local variable, or manually get it from the
`prometheusClient.client.register`
- This commit exposes some utility functions for registering metrics on
the `prometheusClient` class, and for retrieving metrics that have
already been registered
2024-11-13 16:21:49 -08:00
Steve Larson
9da4aa3bce
Updated donations tests to try to handle Stripe changes (#21607)
no ref

Stripe made changes (again) that causes our donation tests to fail. This
round we use an if statement to try to make it more inclusive of cases,
as I've seen them use an accordion button, card button, and no button
all in the past 12h.
2024-11-13 13:26:47 +00:00
renovate[bot]
ead408ed20
Updated Koenig packages (#21606)
ref https://linear.app/ghost/issue/ENG-1751

- changelog: 9ed048c5ff
2024-11-13 15:09:35 +08:00
Ronald Langeveld
06f6483aa7
Fixed broken Stripe donations browser tests (#21605)
no issue

Stripe recently updated their checkout page to use React with Framer
Motion for animations, causing our Playwright tests to intermittently
fail when attempting to click the “Card” payment button. The standard
Playwright `.click()` method was unable to interact with the button
reliably due to animation-related delays, where the button was present
in the DOM but not fully interactable according to Playwright’s strict
visibility checks.

Switching to `dispatchEvent('click')` directly fires the click event on
the button, bypassing Playwright’s visibility and interactability
checks. This ensures the test can proceed without waiting for animations
to fully complete, resolving the issue with the Stripe checkout flow.
2024-11-13 06:20:21 +00:00
Princi Vershwal
01120c9e2f
Added 2fa to re-authenticate flow inside the editor (#21599)
Ref
https://linear.app/ghost/issue/ENG-1625/re-authenticate-flow-inside-the-editor-doesnt-support-2fa
2024-11-13 04:26:49 +00:00
Steve Larson
38f6bdaa72
Fixed flaky batch sending tests (#21604)
ref https://linear.app/ghost/issue/ENG-1749

Batch sending tests were failing with MySQL fairly regularly. It appears
to be a race condition where the listener for the batch sending job
having completed is returning too early, causing the subsequent
Bookshelf data model refresh to happen too soon.

This is a fundamental flaw in the JobManager awaitCompletion handler
(and how the batch sending system interacts with it) as there's no way
to identify one batch from another - they all use the same name, and we
don't pass along any metadata.
2024-11-12 16:15:43 -06:00
Kevin Ansfield
a25e79f041 Updated email golden-post snapshot to match modified bookmark rendering
ref https://github.com/TryGhost/Koenig/pull/1388

- includes new truncation of bookmark card content
2024-11-12 13:26:04 +00:00
renovate[bot]
a7a4b96aff Update Koenig packages 2024-11-12 13:26:04 +00:00
matsbst
a2a3b4eacf
🌐 Translated newsletter.json to Norwegian (#21595)
Complete translation of newsletter to Norwegian 🇳🇴
2024-11-12 18:18:26 +08:00
Sunghyun Kim
7c70c0630e
🌐 Added Korean i18n translations (#21577)
ref ONC-557
2024-11-12 16:24:13 +08:00