Commit Graph

39288 Commits

Author SHA1 Message Date
Sanne de Vries
7d97c4659d
Improved comments UI styles (#20957)
REF https://linear.app/tryghost/issue/PLG-225

- Reduced overall spacing and font-sizes for it to be more compact
- Optimised mobile spacing and typography
2024-09-18 12:52:13 +00:00
Hannah Wolfe
01c75bb3be
Removed visits and renamed unique visitors (#21035)
closes
https://linear.app/tryghost/issue/ANAL-82/unique-visitors-vs-visits-question

- In our current implementation we don't have a difference between
unique visitos and visits, instead we have unique visits
- Updated the UI to represent this for now, we may change it later
2024-09-18 13:17:47 +01:00
Princi Vershwal
773f514ddb
🎨 Added a maximum limit of 100 for GET members admin endpoint (#20643)
Ref: https://linear.app/tryghost/issue/SLO-188/set-a-maximum-limit-for-get-members-api

Endpoint: ghost/api/admin/members/?limit=all

Change Overview: We are updating the GET ghost/api/admin/members/ endpoint to remove support for the limit=all parameter. Previously, a request like GET ghost/api/admin/members/?limit=all would return a list of all members. Going forward, any request with limit=all or a limit greater than 100 will only return up to 100 members per request.
This change aims to improve the performance and scalability of the API.

What changes for users? - They will have to implement pagination to retrieve the list of all members.
2024-09-18 11:17:56 +00:00
Hannah Wolfe
036c175a5d
Updated top metrics to refetch on change (#21033)
closes
https://linear.app/tryghost/issue/ANAL-67/audience-filtering-doesnt-update-the-top-metrics-just-the-charts

- We want the data to be refetched whenever the chart range or audience
args change
- I don't think this is the right pattern, but we're going to move to a
react project in a few weeks, and I think this will be ok for that long
2024-09-18 11:43:16 +01:00
Hannah Wolfe
cb3a116cf8
Updated kpi-overview top bar fetch to use params (#21032)
ref
https://linear.app/tryghost/issue/ANAL-67/audience-filtering-doesnt-update-the-top-metrics-just-the-charts

- At the moment we are manually fetching the top bar data for KPIs via
Ember.
- This was done quickly, and didn't make use of the params for audience
or chartRange
- We need these params to fetch filtered data results
2024-09-18 11:17:55 +01:00
Michael Barrett
d7ee3b2e42
Updated activitypub app to utilise new activities endpoint (#21025)
refs
[AP-377](https://linear.app/tryghost/issue/AP-377/inbox-returning-33mb-of-data),
[TryGhost/ActivityPub#40](https://github.com/TryGhost/ActivityPub/pull/40)

Updated activitypub app to utilise new activities endpoint which returns
a paginated list of activities
2024-09-18 10:33:52 +01:00
renovate[bot]
8d957c3ec1 Update dependency @slack/webhook to v7.0.3 2024-09-18 06:49:39 +00:00
Daniel Lockyer
5832ab5138 Added workaround for internal adapter dependencies
refs https://linear.app/tryghost/issue/DEV-23/workaround-for-yarn-caching-issues

- in our build pipeline, we add some more dependencies for our internal
  adapters
- recently we've been seeing caching issues with these dependencies, not
  sure why
- to workaround that, we'll just include them here and eventually bring
  the adapters into the OSS repo
2024-09-18 08:34:51 +02:00
chicodurden21
be8c3ec100
Updated Portuguese translations (#21023)
no issue
2024-09-17 22:11:52 +02:00
Sag
99d8a5777f
Fixed "Unsaved post" modal shown after publishing (#21028)
ref https://linear.app/tryghost/issue/ENG-661
ref INC-109

- this PR reverts two commits: 5903dd7 and 426b1d4
2024-09-17 18:55:03 +00:00
Tomáš Baránek
7838e5cd59
Added new Czech translations (#20941)
no issue
2024-09-17 19:15:40 +02:00
Kevin Ansfield
03df113d5c Improved logging of unsaved changes modal
ref https://linear.app/tryghost/issue/ENG-661

Logging the full lexical objects to Sentry for the "showing leave editor modal" event isn't very useful because they almost always truncated due to size or stripped due to potentially sensitive data which makes the reports difficult to debug and action.

- added `code` to the context for each report to make identification easier
- updated `reason` for the lexical diverged reason to better match what's happened
- stripped `lexical`, `scratch`, and `secondaryLexical` from the context that is logged to Sentry because they aren't actionable there and just add noise
- added a diff to the logged context for the lexical change reason to more easily identify the changes that triggered an unexpected modal display
  - previously we didn't get full objects in Sentry so couldn't do a comparison and the local workflow was to grab the logged scratch and secondaryLexical values and run a manual diff - this should help in both cases
2024-09-17 17:22:02 +01:00
Princi Vershwal
1c08fd2b9d
Update dependency gscan to v4.43.5
Ref:
https://linear.app/tryghost/issue/ONC-318/support-escalation-re-500-error,
https://linear.app/tryghost/issue/ENG-1444/gscan-slow-checking-for-themes-with-many-files
2024-09-17 13:40:36 +00:00
renovate[bot]
c5dd77e551 Update dependency terser to v5.33.0 2024-09-17 12:27:26 +00:00
renovate[bot]
3d65690987 Update dependency jwk-to-pem to v2.0.6 2024-09-17 14:13:00 +02:00
Sag
ab47dc719d
Released Portal v2.43.1 (#21017)
no issue
2024-09-16 20:23:59 +00:00
Michael Barrett
4ace5104a6
Added toggle sidebar size button to article modal in admin-x-activitypub (#21015)
no refs

Added a button to toggle sidebar size from the article modal in the
admin-x-activitypub app
2024-09-16 16:50:22 +01:00
Michael Barrett
12710eaefa
Added open reply notification in sidebar functionality (#21014)
no refs

Added logic to open the notification in the sidebar when the
notification is clicked if it is a reply notification
2024-09-16 16:49:52 +01:00
Princi Vershwal
5903dd7fb4
Checking unique names for icon and thumbnails before saving locally (#21012)
Ref: https://linear.app/tryghost/issue/ENG-1554/wrong-youtube-thumbnail
2024-09-16 19:19:35 +05:30
Sag
430fbdb987
🐛 Fixed member filtering for "Unsubscribed from newsletter" filters (#20926)
ref https://linear.app/tryghost/issue/ENG-1466
ref https://linear.app/tryghost/issue/ENG-1484

- Previously, filtering members with multiple "Unsubscribed from
newsletter x" led to no filtering at all, all members were returned
- This was caused by a bug in NQL, that is fixed in version 0.12.5, cf.
[commit](dd18d1d6ca)
- We're also removing the safeguard in the product around bulk deletion
when multiple newsletter filters are in use, as the root problem has
been fixed
2024-09-16 11:16:49 +02:00
Daniel Lockyer
c29dc48370 Updated version handling in Admin-X Settings
fix https://linear.app/tryghost/issue/DEV-22/add-support-to-admin-for-parsing-ghost-git-version

- we need to be handle the output given by `git describe`, to account
  for upcoming changes to our versioning
- this commit allows Admin-X Settings to parse these strings, and adds
  tests to check for this
2024-09-16 09:57:09 +02:00
Ghost CI
1f3e72eac8 v5.94.1 2024-09-13 15:05:36 +00:00
Kevin Ansfield
a9bf6c66ed Improved displayed error message when editor reaches bad saving state
ref https://linear.app/tryghost/issue/ONC-323

- added explicit 404 handling to the editor's save task so we can display a more direct/useful error message
2024-09-13 11:35:53 +01:00
Kevin Ansfield
f054205e58 Fixed errors from 404 error handler for non-transition 404s
ref https://linear.app/tryghost/issue/ONC-323

- our fallback 404 error handler assumed we always had a transition along with the error
  - this wasn't a bad assumption, it should be very unlikely that we see a 404 outside of navigating to a non-existent/deleted resource
  - unfortunately we weren't handling the error thrown by our error handler which meant the error was silent as far as the user was concerned
  - having a silent error meant that in very rare circumstances the editor could get into a state where saving was failing but there was no indication of that
- updated the fallback 404 error handler to only do something when navigation was occurring in which case it transitions to the 404 screen, otherwise let the error continue to our generic API error handling which will stay on the current screen but show an error alert
- adjusted the editor saving to actually trigger autosave-after-change when testing (albeit with 100ms wait compared to 3s) so the tests better reflect actual behaviour
2024-09-13 11:02:55 +01:00
Fabien 'egg' O'Carroll
a44274d7f3
Fixed hostname check for reply notificiations (#21002)
In order to show replies in our notifications, we loop through all the
replies in our inbox, and filter them by the ones replying to an account
on our domain, however the check we were doing was on the admin domain -
which is sometimes the same as the frontend domain, but not always. This
fixes the check so that we check the frontend domain, which is the one
used by activitypub.
2024-09-13 16:54:31 +07:00
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