Commit Graph

39479 Commits

Author SHA1 Message Date
Steve Larson
d436fa5e8b
Bumped signup-form (#21215)
no ref
- bumped to include i18n changes
2024-10-03 21:39:13 +00:00
Steve Larson
8aa920e425
Bumped search (#21216)
no ref
- bumped to pull in i18n changes
2024-10-03 21:33:19 +00:00
Steve Larson
ddf1744231
Bumped Portal (#21214)
no ref
- bumped to get i18n changes
2024-10-03 21:26:17 +00:00
Cathy Sarisky
cf63094e13
🌐 Updated Hindi translations (#21208)
no ref

Hindi translations - original PR from meSingh, thank you! #20631
2024-10-03 21:01:39 +00:00
Cathy Sarisky
69a283b229
🌐 Added Urdu translations (#21209)
no issue

A re-submission of @siddiqss 's work on translating Urdu.  
#18508

---------

Co-authored-by: Steve Larson <9larsons@gmail.com>
2024-10-03 20:43:32 +00:00
renovate[bot]
83e9eb1345
Pin dependency parse-prometheus-text-format to 1.1.1 (#21211)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[parse-prometheus-text-format](https://redirect.github.com/yunyu/parse-prometheus-text-format)
| devDependencies | pin | [`^1.1.1` ->
`1.1.1`](https://renovatebot.com/diffs/npm/parse-prometheus-text-format/1.1.1/1.1.1)
|

Add the preset `:preserveSemverRanges` to your config if you don't want
to pin your dependencies.

---

### Configuration

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

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, 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:eyJjcmVhdGVkSW5WZXIiOiIzOC45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzguOTcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-03 19:16:42 +00:00
Chris Raible
768336efad
Added a prometheus metrics exporter to Ghost (#21193)
ref
https://linear.app/tryghost/issue/ENG-1505/add-prometheus-metrics-server-to-allow-monitoring-ghost-metrics

# Summary
This commit includes two main components: a prometheus client class to
collect metrics from Ghost, and a standalone metrics server that exposes
a /metrics endpoint at a separate port (9416 by default) from the main
Ghost app.

The prometheus client is a very thin wrapper around
[prom-client](https://github.com/siimon/prom-client). We could use
prom-client directly, but this approach should make it easier to switch
to a different prometheus client package (or make our own) if we ever
need to down the line.

The list of default metrics this enables is specified in an e2e test
[here](https://github.com/TryGhost/Ghost/pull/21192/files#diff-ebc52236be2cd14b40be89220ae961f48d3f837693f7d1da76db292348915941R66-R92).
This also gives us the ability to create and collect custom metrics,
although none are included in this commit yet.

# Configuration
The prometheus client and the metrics server are both disabled by
default, but can be enabled by setting the metrics_server:enabled flag
to true.

You can also define a custom host and port using `metrics_server:host`
and `metrics_server:port`.

## Why not expose the /metrics endpoint in one of the existing express
apps?
The standalone express app exists for two main reasons:

1. We don't want these metrics to be public, and the easiest way to
accomplish that is to expose the /metrics endpoint at a different port
that won't be exposed to the internet.

2. Creating a standalone express instance decouples the metrics endpoint
from the Ghost server, so if Ghost is not responding for whatever
reason, we should still be able to scrape metrics to understand what's
going on internally.


## Impact on Boot & Shut down time
The prometheus client is initialized early in the boot process so we can
collect metrics during the boot sequence. Testing locally has shown that
this increases boot time by ~20ms. The metrics server which exposes the
/metrics endpoint is not initialized until after the background
services, and it is not awaited, to avoid impacting boot time. None of
this code, including the requires, will run if the
metrics_server:enabled flag is set to false (or not set).

Shutting down the metrics server is added as a cleanup task for the main
Ghost server instance, and is setup to shut down with 0 grace period to
avoid impacting shut down time.
2024-10-03 11:34:25 -07:00
Steve Larson
135772620d
Updated Norwegian i18n string order (#21210)
no ref

This was causing i18n test failures because the string was being reordered (updated) to be fully alphabetical.
2024-10-03 17:48:16 +00:00
Chris Raible
52ac218867
Fixed flaky publishing browser tests (#20935)
no issue

- These two tests were relying on the ordering of the posts in the posts
list, which can vary when running the test suite all together (as we do
in CI), since multiple tests can be running and creating/deleting posts
in parallel.
- This commit navigates directly to the post's URL to avoid this
problem.
2024-10-03 10:06:28 -07:00
matsbst
b125a25dfc
🌐 Updated Norwegian translations (#20917)
no ref

Fixed typos and improved some translations with correct wording
2024-10-03 15:27:21 +00:00
ayangizzat
b9063c9e82
🌐 Added Kazakh locale for Portal (#20698)
no ref
2024-10-03 15:22:07 +00:00
renovate[bot]
0bbb29fbf8 Update dependency sanitize-html to v2.13.1 2024-10-03 14:42:44 +00:00
Djordje Vlaisavljevic
0729c76b95 Fixed tabs in profiles showing up in the wrong place
ref https://linear.app/tryghost/issue/AP-429/add-ui-for-searching-and-viewing-mastodon-profiles
2024-10-03 15:30:39 +01:00
Djordje Vlaisavljevic
1bb09a9b7e
Updated ActivityPub inbox layout and profiles (#21200)
- Improved inbox layout for the home screen, optimized for long-form
content
- Added expand/collapse when profile details are too long
- Added link to profile on the original server to profiles

ref https://linear.app/tryghost/issue/AP-463/add-show-all-to-profiles-with-long-summaries-and-attachment-lists, https://linear.app/tryghost/issue/AP-424/inbox-and-feed-view-need-to-be-differentiated
2024-10-03 15:01:20 +01:00
Michael Barrett
0d8ea553bd
Updated activitypub search suggestions to be dynamic (#21202)
refs
[TryGhost/ActivityPub#60](https://github.com/TryGhost/ActivityPub/pull/60)

Updated activitypub search suggestions to be dynamic
2024-10-03 14:43:54 +01:00
Cathy Sarisky
1196688b0e
🌐 Improved i18n support for Portal error messages (#21190)
no ref

Expose (some) Portal error strings for translations

💩This is a somewhat hacky (but test-passing and individual inspection
passing) solution to the way Portal handles errors. Or rather, the
half-dozen ways Portal handles errors.

Passing 't' around with context and state, and occasionally recreating
it from the site object. Yes, I am also somewhat horrified, but a better
implementation will need a major rewrite of Portal.

Addresses errors in both the popover React app and in the
data-attributes.

There are probably more. Since Portal exposes raw API responses in some
places, it's hard to enumerate everything that /might/ end up being
client-facing, but at least I've gotten the ones that I've commonly
seen.

Improvements very welcome.
2024-10-03 13:35:23 +00:00
Hannah Wolfe
269ed3891d
Configured i18n tests to run for sodo-search (#21199)
ref https://github.com/TryGhost/Ghost/pull/21055

- Now that sodo-search has i18n, we should run i18n tests when this
package changes as well
2024-10-03 07:56:02 -05:00
Kevin Ansfield
d65f07e4fd Extracted basic request/response tests in e2e comments test file
no issue

- removes some repetition making tests more compact and easier to read
2024-10-03 11:04:40 +01:00
Kevin Ansfield
a2d44c8778 Refactored members-comments e2e test
no issue

Initial pass at refactoring the tests and making each independent so they aren't relying on data from previous tests.

- DRYed up some repeated API requests by extracting `testPostComment()`, `testGetComments()`, and `assertAuthorEmailSent()`
- removed data inter-dependency across tests
  - truncated the tables under test before each test is run
  - added suite of db fns to populate the database without having to do so via API requests
  - updated all tests to include their own data setup calls rather than relying on fixtures and modifications from earlier tests
2024-10-03 10:07:46 +01:00
Steve Larson
c26aacacf5
Fixed Date.now() use in email analytics unit tests (#21188)
no ref

We had an instance where this was a ms off and I should've used mock
timers when I first wrote this. This should prevent any rare clock
mishaps.
2024-10-02 17:54:48 +00:00
Raka Afp
851ec7eb0b
🌐 Added Bahasa Indonesia translation for search & portal (#21179)
no ref

Translated/updated all relevant strings in the search & portal feature
to Bahasa Indonesia.

---------

Co-authored-by: Cathy Sarisky <42299862+cathysarisky@users.noreply.github.com>
2024-10-02 12:36:34 -05:00
Hannah Wolfe
4b1ce62ca9
Fix origin attribution in Tinybird analytics hits (#21187)
closes 
https://linear.app/tryghost/issue/ANAL-96/data-discrepancy-between-charts-when-filtering

- Atttribute the referral of the first hits to the whole session in `analytics_sources_mv`, while keeping the raw hits in `analytics_hits`
- Updated tests accordingly
- This is a rebased / reordered version of https://github.com/TryGhost/Ghost/pull/21166

Co-authored-by: alejandromav <hi@alejandromav.com>
Co-authored-by: Alejandro Martin <alejandromav@tinybird.co>
2024-10-02 17:27:43 +01:00
Hannah Wolfe
f082ba68e0 Added tinybird tests for filtering
ref https://linear.app/tryghost/issue/ANAL-96/data-discrepancy-between-charts-when-filtering

- This adds a set of tests to describe what the data should look like when we filter on various values
- We have tests for source and browser which are pulled from different MVs
- The result files are generated using ./scripts/gen_test_results.sh, and then manually verified
- We know they are not yet fully correct
2024-10-02 17:04:24 +01:00
Hannah Wolfe
60443726c9 Fixed tinybird test fixture data
ref https://linear.app/tryghost/issue/ANAL-96/data-discrepancy-between-charts-when-filtering

- This fixes the test data so that the session first hit and subsequent hits are in chronological order
- It also makes sure there isn't more than 30 minutes between hits, as our tracking script is only designed to keep sessions alive for 30 minutes so the data wasn't realistic
- NOTE: This data was generated by a script https://gist.github.com/ErisDS/25bb36f38d4c5a3f01d86f34ea5be707 - which didn't take these things into account

Co-authored-by: alejandromav <hi@alejandromav.com>
2024-10-02 17:04:24 +01:00
renovate[bot]
34090f7370
Update dependency flexsearch to v0.7.43 (#19455)
This PR contains the following updates:

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

---

### Release Notes

<details>
<summary>nextapps-de/flexsearch (flexsearch)</summary>

###
[`v0.7.43`](12f48e64f7...4c3966709f)

[Compare
Source](12f48e64f7...4c3966709f)

###
[`v0.7.42`](a0a798d7fe...12f48e64f7)

[Compare
Source](a0a798d7fe...12f48e64f7)

###
[`v0.7.41`](5c54b465a8...a0a798d7fe)

[Compare
Source](5c54b465a8...a0a798d7fe)

###
[`v0.7.40`](b8279ebddc...5c54b465a8)

[Compare
Source](b8279ebddc...5c54b465a8)

###
[`v0.7.39`](f18da33d8f...b8279ebddc)

[Compare
Source](f18da33d8f...b8279ebddc)

###
[`v0.7.34`](1d620d68c4...f18da33d8f)

[Compare
Source](1d620d68c4...f18da33d8f)

###
[`v0.7.33`](https://redirect.github.com/nextapps-de/flexsearch/compare/0.7.31...1d620d68c498e6617192fdd6ff6e0e70c666b254)

[Compare
Source](https://redirect.github.com/nextapps-de/flexsearch/compare/0.7.31...1d620d68c498e6617192fdd6ff6e0e70c666b254)

###
[`v0.7.31`](65b027ca31...0.7.31)

[Compare
Source](65b027ca31...0.7.31)

</details>

---

### Configuration

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

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjEuMCIsInVwZGF0ZWRJblZlciI6IjM4Ljk3LjAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-02 16:21:12 +01:00
Michael Barrett
d3d2ea44e4
Updated following/followers in activitypub profile preview to be dynamic (#21170)
refs
[AP-442](https://linear.app/tryghost/issue/AP-442/add-dynamic-following-followers-to-search-result-profile),
[TryGhost/ActivityPub#53](https://github.com/TryGhost/ActivityPub/pull/53)

Updated following/followers in activitypub profile preview to be dynamic
2024-10-02 15:41:25 +01:00
Hannah Wolfe
bce5d9d588
Updated tinybird tooling with usability improvements (#21185)
- Added yarn command to update TB CLI, as that needs doing frequently and I can never remember the command
- Improved safety & usability of tinybird test script by ensuring branches are correctly created before running & adding optional delete
- Updated tinybird test to warn only for sanity check as that's not always a valid check (Will prob remove soon)
- Improved output of tinybird test script on failure, so that the diff is readable and closer to what git shows you
- Added tool to convert tinybird ndjson to csv to make it easier to bring the data into google sheets for verifying numbers
2024-10-02 15:28:39 +01:00
Steve Larson
0f7b1567a3
Reverted "🌐 Updated Portal error handling to be i18n-friendly (#21176)" (#21184)
no ref
- this caused some troubles with error representation and changed
defaulting behavior

Going back to the drawing board on this one. I've been working on a
larger scale refactor so that this could be a hook, which feels much
more appropriate, though a much more substantial change.
2024-10-02 12:06:09 +00:00
renovate[bot]
4bd844fc2c Update dependency @uiw/react-codemirror to v4.23.4 2024-10-02 09:34:41 +00:00
Kevin Ansfield
bb48d3623a Increased feature image alt text length to 191 chars
no issue

- removed the 125 char soft limit so the full 191 char db field length can be used
2024-10-02 10:22:17 +01:00
renovate[bot]
9a93a5cfc6 Pin dependency i18n-iso-countries to 7.12.0 2024-10-02 07:28:28 +00:00
Peter Zimon
7cb8cbdf7a
Showing country names instead of codes in Stats (#21172)
[ANAL-53](https://linear.app/tryghost/issue/ANAL-53/10-stats-page-engineering-stuff)

- So far only country codes were displayed instead of human readable country names in the Stats page
2024-10-02 09:17:06 +02:00
renovate[bot]
9834f0946c Update dependency nx to v19.8.3 2024-10-02 08:38:19 +02:00
Chris Raible
bf7320cfb7
Fixed test that left an instance of ghost running (#21178)
no issue

- This test file starts a Ghost server, but doesn't close it, which can
cause other tests to fail when they try to start an instance of Ghost,
with an `EADDRINUSE` error.
- This change closes the server in the `after` hook
2024-10-01 17:22:48 -07:00
Leif Singer
6965254b3f
🌐 Added German translations for search (#21163)
no ref

This PR adds the translations for `search.js`. It's a bit opinionated in
that ...
- it uses the Anglicism "Posts" to ... "translate" ... "Posts" 😆;
- it uses an asterisk to make sure we address all genders when
translating "authors".

Happy to discuss. ☺️
2024-10-01 21:55:42 +00:00
Cathy Sarisky
6501f1d41b
🌐 Added Kazakh locale and translations (#21174)
no ref

This is a merge & tidy up of [[ayangizzat](https://github.com/ayangizzat)] 's original (https://github.com/TryGhost/Ghost/pull/20698), which was missing the changes to locale, causing folders & files not to generate correctly. All credit goes to @ayangizzat , and thank you for your work!

Kazakh-speaking help still needed for search.json, which is untranslated, and the addition of a few other new strings, and refinements anywhere needed. Please add comments if not yet merged, or open a new PR if already merged.

---------

Co-authored-by: ayangizzt
2024-10-01 21:45:03 +00:00
Steve Larson
49debef3da
🌐 Updated Portal error handling to be i18n-friendly (#21176)
no ref
- Portal was not set up in a way to allow for easy use of the i18n
module for errors, as they weren't a React component
- moved away from the class model to a functional component that could
utilize React state (AppContext)

I'm working on a different refactor that would convert more of Portal to
hooks & functional components so that the codebase is more consistent
and easier to read. This will have to work for the moment while that is
being done, as that's no small task.
2024-10-01 21:19:09 +00:00
Cathy Sarisky
b9547cc120
Improved i18n tests to include commits with missing i18n.js entries (#21175)
no ref

We've had several PRs for new locales that forgot to update i18n.js,
which causes them not to get regenerated by yarn translate. This PR
checks for that error, and also the reverse one where they update i18n
but we're missing folders. (Never expected to error, because 'yarn test'
is defined to include 'yarn translate', which generates the folders.)
2024-10-01 15:04:21 -05:00
Cathy Sarisky
6e599ef541
🌐 Added ⬅️RTL to sodo-search & improved tests (#21152)
no ref

- added dir prop, calculated by i18next from language (using the dir
function)
- tweaked a few styles to use me/ms/pe/ps instead of mr/ml/pr/pl
- added updated test that checks that stemming works in English, and added tests for partial and full-word searching with RTL content.
2024-10-01 18:04:54 +00:00
ココロ
300eba49ca
🌐 Improved sodo-search for CJK (#21148)
no ref

According to the flexsearch documentation, https://github.com/nextapps-de/flexsearch?tab=readme-ov-file#cjk-word-break-chinese-japanese-korean for searching CJK text, need to pass in a custom encode function for better search results.

This enhancement for CJK will only take effect when the ghost site locale is set to one of `zh`, `zh-Hans`, `zh-Hant`, `ja`, `ko`.

Co-authored-by: Cathy Sarisky <42299862+cathysarisky@users.noreply.github.com>
2024-10-01 18:01:54 +00:00
Kevin Ansfield
3bbe8c8c7a
Fixed bugs in post's change-access context menu flow (#21173)
ref 86d61304b1
ref https://linear.app/tryghost/issue/ONC-323

- added `tracked()` to our proxy model object properties
  - fixes default data always showing when opening the modal
- fixed data push after completing modal
- `post.tiers` is set up as an attribute in Admin rather than a relationship
- fixes incorrect tiers list showing when the change access modal is opened again after changing access before the post is re-fetched from the API
- fixed flash of failure button state when saving modal changes
- expanded tests to cover tiers selection
2024-10-01 17:16:23 +00:00
Peter Zimon
8aaac5abe1
Stats page design fixes (#21171)
[ANAL-95](https://linear.app/tryghost/issue/ANAL-95/internal-beta-qa)

Various design refinements and fixes for the Stats page:
- Updated scroll area in detail modals so that the Close button and the footer is never outside the viewport
- The detail modal didn't close after clicking on the filter values
- "Show all" button was displayed also when there were no new items in the detail modal
- Dropdown styles needed a visual update: the toggles were way too huge and inconsistent with other dropdowns
- If no audience was selected we still showed stats. Now it's displaying the default empty screen in this case
- Click through filter indicators had low discoverability
- Technical data styles needed some love: changed the alignment and color scheme
- Mobile size viewports were not handled
- The google favicon API returned 404 many times for sources. Swapped the service for another one that returns favicons more reliably
- Default favicon was not handled. Now it comes from static.ghost.org
2024-10-01 17:51:55 +02:00
Cathy Sarisky
d8c4dfef99
Added content_api_key helper (#21151)
no ref

This very small helper adds {{content_api_key}} to the collection of handlebars helpers available to theme creators. This will make it easier for themes to access the content API key, without either requiring the user to get it from the integrations page and input it on the theme setting page or resorting to JavaScript to read it from one of the built-in script tag attributes -- both ugly workarounds.
2024-10-01 09:13:57 -05:00
Kevin Ansfield
86d61304b1 🐛 Fixed errors creating new posts after a post access change via context menu
ref https://linear.app/tryghost/issue/ONC-323

After changing a post's access via the posts list context menu, creating new posts or members would not work correctly.

- the issue stemmed from `this.post.set('currentState.parentState.isNew', false);` that was called when changing a post's access level, after that all Ember Data models created from the store would have `isNew: false` causing Ember Data to attempt a PUT request to update the not-yet-created model rather than a POST request to create it
- we were only using a real post model instance in order to run validations against the post access level settings but we can do that just as easily by creating a new object and injecting our validation mixin
2024-10-01 15:10:59 +01:00
Leif Singer
4679bbb10b
🌐 Added and adjusted various German translations in portal.json (#21165)
no ref

This PR adds and adjusts various German translations in `portal.json`.
I'm a native speaker and have made adjustments to the best of my
knowledge. As in #21163, the gender variations are a bit opinionated and
I'm happy to discuss.
2024-10-01 08:48:05 -05:00
Leif Singer
44bfb8a17a
🌐🐛 Fixed German translation for "Sign up" in comments (#21162)
fixes #21104 

This PR corrects a single translation. The German translations for "sign
up" and "sign in" _can_ both be "anmelden", but are confusing when used
together. So here we're switch to "register now" and "sign in" to make
the distinction clearer. IMHO even in English "register now" and "sign
in" might be a better (more distinguishable) combination, but it's much
harsher in German.
2024-10-01 00:24:55 +00:00
Volodymyr Lavrynovych
80794486a9
🌐 Added Ukrainian translations (#20709)
no ref

---------

Co-authored-by: Steve Larson <9larsons@gmail.com>
2024-09-30 11:36:00 -05:00
ココロ
647e675ff5
🌐 Updated Chinese translations (#21154)
-translation for zh portal and search

---------

Co-authored-by: Steve Larson <9larsons@gmail.com>
2024-09-30 11:35:05 -05:00
Alexandre "Lekler" Rodrigues
5381530b21
🌐 Updated Portal pt-BR translations (#21076)
no ref

Filled in 6 missing translations and made style corrections to existing translations to improve clarity and consistency.
2024-09-30 11:19:02 -05:00
Fernando Ochoa Olivares
0756000766
🐛🌐 Fixed capitalization in Spanish sign-up string (#20711)
no ref

When beginning a sentence with exclamation in Spanish first letter needs
to be uppercase.
2024-09-30 11:15:05 -05:00