Commit Graph

39263 Commits

Author SHA1 Message Date
Fabien 'egg' O'Carroll
9e4704a75f
Fixed the rendering of object attachments (#21001)
Pulled out the logic of finding the attachment(s) into a shared
function, which will only return an array if there are multiple
attachments, otherwise either null or an object will be returned.

This fixes an issue where the code assumed that an array meant
we have multiple attachments
2024-09-13 16:14:23 +07:00
Chris Raible
971d497c1e
Added caching to LastSeenAtUpdater (#20964)
ref
https://linear.app/tryghost/issue/ENG-1543/debounce-the-members-lastseenatupdater

- The `LastSeenAtUpdater.updateLastSeenAt` function is called in
response to a `MemberClickEvent` — when a member clicks a link in an
email with tracking enabled. This function can be called many times for
the same member in a short period of time if e.g. a link checker is
clicking all the links in an email they received.
- This function should only update a member's `last_seen_at` timestamp
once per day. To accomplish this, `updateLastSeenAt` runs a
`select...for update` query to find the member's current `last_seen_at`
timestamp, and only updates the timestamp if the current `last_seen_at`
is before the start of the current day. The `for update` is required to
avoid a race condition, which previously caused this function to update
the `last_seen_at` timestamp more frequently than needed, which results
in many unnecessary database queries. However, we still run the initial
`select...for update` query for each event, which seems to be resulting
in contention for locks on the member's row in the `members` table.
- This commit introduces a simple in-memory cache so that we avoid
calling `updateLastSeenAt` if the member's `last_seen_at` timestamp has
already been updated in the current day, which should avoid running so
many `select...for update` queries and locking the `members` table up.
2024-09-13 00:54:43 -07:00
Fabien 'egg' O'Carroll
c98ff3856e
Used attributedTo over actor when available (#20998)
refs https://linear.app/tryghost/issue/AP-388

The attributedTo property of objects refers to the author of the object,
wheras the actor of an activity refers to the author of the activity -
in the case of a `Create` activity - these are generally the same, but
in the case of an `Announce` they are different, the author refers to
the "announcer" and the attributedTo the author of the content! This is
a quick patch to use the true author when it's available, and in a
format we can handle.
2024-09-13 05:54:25 +00:00
Kevin Ansfield
a5b1f2e9fa Added logging for editor saveTask errors
ref https://linear.app/tryghost/issue/ONC-323

- we're seeing a rare situation where the editor can get into a bad state when creating a new post that means saves silently fail
- added logging to help debug
2024-09-13 00:07:08 +01:00
Kevin Ansfield
24e9436155
Removed unused react-editor template file (#20996)
no issue

- unused remnant of early editor testing
2024-09-12 22:20:19 +00:00
Chris Raible
b90aca2816
Removed jaeger container from docker compose (#20994)
no issue

- OpenTelemetry has been problematic in a number of ways (boot time,
breaking the frontend). May revisit it at some point in the future, but
for now it is only exporting metrics via prometheus and not traces, so
there's currently nothing sending data to this jaeger container
- Cleaning it up for now as it's just sitting there idly consuming
resources
2024-09-12 10:37:54 -07:00
Chris Raible
2a0d49c539
Added MySQL data volume to docker compose (#20982)
no issue

- This allows us to run `docker-compose down` or to restart docker
desktop without losing all our local databases
- Added a data volume to the MySQL service in the `docker-compose.yml`
file to persist the data between container restarts
- The `yarn docker:reset` command will still reset all the data in the
database since it uses `down -v` to remove the volumes as well
2024-09-12 09:38:24 -07:00
Djordje Vlaisavljevic
eb796e0785 Fixed nested Replies line placement
ref https://linear.app/tryghost/issue/AP-374/add-design-for-replies
2024-09-12 16:35:50 +01:00
Djordje Vlaisavljevic
a087e329ed
Updated ActivityPub Feed and Replies design (#20992)
- Added activity icon for Replies
- Updated Replies design
- Updated hard-coded Profile values to more realistic ones
- Renamed ActivityPub nav item and moved it to the top of the navbar
- Added a check for post attachments
2024-09-12 16:03:49 +01:00
Sam Lord
625c89e37f
Added the ability to run browser tests using local Portal (#20990)
ref DOGM-32

Using the dev script as a template, this script runs the tests with
local copies of the applications needed instead of the released CDN
versions
2024-09-12 15:55:47 +01:00
renovate[bot]
2e43017757 Update dependency webpack to v5.94.0 2024-09-12 13:24:07 +00:00
Daniël van der Winden
96cfa97c84
Updated buttons for share modal and post analytics (publish flow) in dark mode (#20989)
Buttons in the share modal as well as on the Analytics page weren't
getting the right colours and hover states. That's fixed now.
2024-09-12 11:39:50 +00:00
Daniël van der Winden
7fa8faefc7
Improved optical (vertical) alignment for onboarding (#20988)
The optical (vertical) alignment of the onboarding was a tad off. This
improves that.
2024-09-12 10:44:06 +00:00
renovate[bot]
6cf3dcd5f5 Update dependency @tailwindcss/forms to v0.5.9 2024-09-12 12:10:08 +02:00
Ronald Langeveld
6d3317fcfc
Added feature flagging system for Comments UI (#20984)
ref PLG-229

- Previously we had no way of using Ghost labs flags in Comments UI.
- With this change, we now get Labs data from the existing content
  settings endpoint.
- Additionally, we have a `useLabs` hook that can be accessed from
  anywhere in the App to put those awesome new features behind a flag
for staging
- And we can pass labs params to the initialiser for testing.

For more details: https://ghost.slack.com/archives/C06TQR9SHSM/p1726133527960489
2024-09-12 18:36:37 +09:00
Michael Barrett
6704705c86
Added comment navigation in the admin-x-activitypub app (#20987)
refs
[AP-279](https://linear.app/tryghost/issue/AP-279/handle-incoming-replies)

Implemented a basic navigation stack for comments in the
admin-x-activitypub app. This allows users to navigate between comments.
2024-09-12 10:23:27 +01:00
Ronald Langeveld
7d86c2ce9c
Added labs props to Content Settings API (#20965)
ref PLG-229

- Added Labs properties to the Content Settings API endpoint to be
reachable in Portal and Comments UI app.
2024-09-12 18:18:57 +09:00
Michael Barrett
2fc6634573
Added nested comment rendering in admin-x-activitypub app (#20980)
refs
[AP-279](https://linear.app/tryghost/issue/AP-279/handle-incoming-replies)

Added nested comment rendering in admin-x-activitypub app so that
replies to posts and replies to replies can be viewed by the user
2024-09-12 08:20:39 +01:00
Ronald Langeveld
ba74785250
Added comment improvements feature flag (#20986)
ref PLG-229

- Added `commentImprovements` feature flag toggle
2024-09-12 14:49:22 +09:00
renovate[bot]
cf8691d07f Update dependency tailwindcss to v3.4.11 2024-09-12 07:38:09 +02:00
renovate[bot]
43a392d734 Update dependency express to v4.21.0 2024-09-12 07:37:27 +02:00
Sirichai Chulee
58ca6f3d95
Updated uuid to crypto.randomUUID() (#20821)
The uuid package README suggests using the node builtin `crypto` library if
we're only using uuid.v4, which we are.
2024-09-12 09:09:30 +07:00
Michael Barrett
2cb9cf8b8b
Added comments to activities in the admin-x-activitypub app (#20958)
refs
[AP-279](https://linear.app/tryghost/issue/AP-279/handle-incoming-replies)

Wired up the comments to the activities in the admin-x-activitypub app
so that comments (replies) can be viewed by the user
2024-09-11 17:44:12 +01:00
Michael Barrett
cbacea418f
Added reply handling to the notifications tab of the admin-x-activitypub app (#20956)
refs
[AP-279](https://linear.app/tryghost/issue/AP-279/handle-incoming-replies)

Added reply handling to the notifications tab of the admin-x-activitypub
app so that replies to posts can be viewed by the user
2024-09-11 17:36:02 +01:00
Peter Zimon
028c1a6929
Fix formatting error on Stats page (#20978)
[ANAL-79](https://linear.app/tryghost/issue/ANAL-79/stats-page-v10-design-refinements)

- There was a formatting error on the Stats page that was causing the
KPIs to be displayed incorrectly. This commit fixes that error.
2024-09-11 15:02:31 +00:00
Peter Zimon
8d29479981
Refined ui details for Stats page (#20977)
[ANAL-79](https://linear.app/tryghost/issue/ANAL-79/stats-page-v10-design-refinements)

Further UI refinements for Stats page
2024-09-11 14:14:05 +00:00
Daniel Lockyer
8325fb85b2 Fixed TS types being cached by Nx
ref https://linear.app/tryghost/issue/DEV-20/faster-builds

- we need these to be cache so we can restore them in subsequent builds
2024-09-11 15:58:56 +02:00
Peter Zimon
23ffdaf860
Added help pages to Portal links (#20974)
DES-777

- "Not receiving emails" and "Disabled emails" help pages are not
possible to access directly which makes communication to members hard
2024-09-11 13:19:16 +00:00
Daniel Lockyer
6744bb9457 Tidied up monobundle output
- just some minor readability improvements
2024-09-11 15:09:27 +02:00
Daniel Lockyer
2a39053962 Configured outputs for Admin build step
ref https://linear.app/tryghost/issue/DEV-20/faster-builds

- by doing this, we can tell Nx which files should be restored when the
  cache is restored
2024-09-11 14:12:30 +02:00
Daniel Lockyer
66cb1aee72 Added GHOST_CDN_URL env var to Nx cache inputs
ref https://linear.app/tryghost/issue/DEV-20/faster-builds

- this prevents Nx not rebuilding apps when the CDN url changes
2024-09-11 13:22:35 +02:00
Peter Zimon
7c64a7ac09
Stats page UI updates (#20970)
[ANAL-79](https://linear.app/tryghost/issue/ANAL-79/stats-page-v10-design-refinements)

- typography is inconsistent in table headings
- chart section headings are not unified
- spacings are off between section and data headings
- inactive KPI tab colors are too light
- tech data numbers are not formatted
2024-09-11 10:56:14 +00:00
Daniel Lockyer
3aaa5d3a70 Removed yarn from main:submodules
- we don't really need to run `yarn` here, as it pulls down all the
  dependencies for the 2 themes
- we rarely need these locally, and it's also slowing down CI, so we can
  just remove it from here for now
2024-09-11 12:41:38 +02:00
renovate[bot]
7fc092447d Update dependency pump to v3.0.2 2024-09-11 10:16:42 +00:00
renovate[bot]
af244477ac Update dependency @tailwindcss/forms to v0.5.8 2024-09-11 12:05:22 +02:00
renovate[bot]
d63c4d13ec Update dependency html-validate to v8.22.0 2024-09-11 12:03:53 +02:00
renovate[bot]
979e704410 Update dependency express to v4.20.0 2024-09-11 08:21:15 +02:00
Chris Raible
a5dfd6016e
Reorganized test cases for lastSeenAtUpdater (#20963)
no issue

- These tests were all in a single `describe` block, making it difficult
to navigate and add more tests.
- This commit adds a nested `describe` block for each method on the
`lastSeenAtUpdater`, making it easier to understand the test cases, and
to add more. None of the tests themselves have changed, just the
organization of them.
2024-09-10 15:40:57 -07:00
renovate[bot]
482cf08ee7 Update dependency pump to v3.0.1 2024-09-10 20:20:08 +00:00
renovate[bot]
59a5a81d3b Update dependency @uiw/react-codemirror to v4.23.2 2024-09-10 20:19:47 +00:00
renovate[bot]
137a0b6aba Update dependency yjs to v13.6.19 2024-09-10 14:43:10 +00:00
Kevin Ansfield
174b13982a
Released signup-form 0.1.6 (#20959)
ref https://linear.app/tryghost/issue/ONC-314

- releasing new code for integrity token passthrough
2024-09-10 15:34:00 +01:00
Princi Vershwal
b14b44faa4
ENG-1526 Added logs and sentry messages in Router Controller (#20955)
Ref:
https://linear.app/tryghost/issue/ENG-1526/errors-from-members-api-routercontroller-are-being-lost

The try/catch/re-throw pattern, that hides errors, is used throughout
the RouterController.js file.
I have not changed the try/catch/re-throw pattern because it helps in
sending clean messages to the users. We may not want to return internal
errors as API responses.
I have added logs and Sentry messages that will help us debug without
losing error messages.
2024-09-10 16:47:12 +05:30
renovate[bot]
9860371df7 Update dependency i18next to v23.15.1 2024-09-10 10:04:37 +00:00
renovate[bot]
d3cf1045f5 Update dependency body-parser to v1.20.3 2024-09-10 00:22:39 +00:00
renovate[bot]
3677f83d1c Update dependency i18next to v23.15.0 2024-09-09 18:15:47 +00:00
Peter Zimon
5be65b7e21
Fixed missing initials on staff invites' avatars (#20948)
DES-775

- Initials were missing on avatars in the invite list of Settings/Staff
2024-09-09 13:56:29 +00:00
renovate[bot]
1dc2a3bcfd Update dependency terser to v5.32.0 2024-09-09 11:38:16 +00:00
chicodurden21
e2e2d94ac0
Added Portuguese translations for Comments app (#20927)
no issue

- Just added the portuguese translation for the comments file
2024-09-09 12:34:06 +01:00
Peter Zimon
b16c80259e
Stats UI updates (#20946)
[ANAL-43](https://linear.app/tryghost/issue/ANAL-43/implement-all-possible-ui-for-10)

- The BarList component wasn't using the parameters provided in its
latest release
- Number formatting was missing on all numbers
- "See all" links were missing in Content/Sources/Locations
- Empty/default values was showing [blank]
- Flags were missing for country values
2024-09-09 13:32:28 +02:00