Commit Graph

39272 Commits

Author SHA1 Message Date
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
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