Commit Graph

12257 Commits

Author SHA1 Message Date
Kevin Ansfield
e6df014f84 Cleaned up newsletterExcerpt flag
no issue

- feature is GA so the flag and related conditionals are no longer required
2024-07-03 18:22:39 +01:00
renovate[bot]
6c6d3b6ce4 Update dependency jose to v4.15.9 2024-07-03 09:16:44 +00:00
Daniel Lockyer
895e3719bd Revert "🐛 Fixed unexpected leave confirmation after Cmd+S on member profile"
This reverts commit 186c6f3c42.
2024-07-02 21:49:08 +02:00
Steve Larson
fe31ee34e8
Revert "Improved performance in Admin Posts view (#20503)" (#20514)
ref https://linear.app/tryghost/issue/ONC-111

This reverts commit 3d9d552271.

This commit broke bulk post actions which we do not have tests for, so
we will need to address that as well as add tests.
2024-07-02 14:27:44 +00:00
Sag
92a84f77fd
Removed leftover .only on Admin unit tests (#20513)
no issue
2024-07-02 14:10:23 +00:00
Fabien 'egg' O'Carroll
a4107b8202
🐛 Fixed incorrect member subscription details in Admin (#20476)
fixes https://linear.app/tryghost/issue/ENG-642

- When a subscription is in the `canceled` state the corresponding
Member has no access to the Ghost site. The only time a Member will
continue to have access if their subscription is due to cancel at the
period end is if it is still in an active state, which is one of
`active` `trialing` `unpaid` or `past_due`
- When a subscription is canceled immediately (i.e. before the end of
the current billing period), we now render "Ended" without a date,
because we don't store the cancellation date in the subscription object.
We previously used "Ended {current_period_end}" which would sometimes
lead to dates in the future
- Bonus: refactored code and added unit tests

---------

Co-authored-by: Sag <guptazy@gmail.com>
2024-07-02 13:58:20 +00:00
Sanne de Vries
18719e2168
Updated password reset notification (#20510)
REF DES-540
2024-07-02 15:24:14 +02:00
Daniel Lockyer
23075b7bf8 Optimized aggregating member attribution statistics
- the existing code creates a new moment instance, takes away some days
  and then formats the result
- this is run for every entry of the member attribution stats, which
  means dashboards for big sites with a lot of attribution data become
  slow
- this value doesn't change across each iteration of the filter, so we
  can just extract it out and calculate it once
- this commit removes this code block from the flamegraph completely
2024-07-02 11:44:22 +02:00
Princi Vershwal
62aad6fd84
🐛 Fixed analytics sources to not be case sensitive (#20506)
fixes https://linear.app/tryghost/issue/ENG-925/analytics-sources-shouldnt-be-case-sensitive
2024-07-02 08:41:32 +00:00
Princi Vershwal
e6b1f8a8bf
Fixed analytics sources to not be case sensitive (#20506)
fixes
https://linear.app/tryghost/issue/ENG-925/analytics-sources-shouldnt-be-case-sensitive
2024-07-02 12:17:13 +05:30
Daniel Lockyer
186c6f3c42 🐛 Fixed unexpected leave confirmation after Cmd+S on member profile
fix https://linear.app/tryghost/issue/ENG-779/%F0%9F%90%9B-cmds-does-not-save-member-profile-changes

- previously, pressing Cmd+S on a member profile would save the profile,
  but the dirty attributes weren't being cleaned, so the application
  would trigger the leave confirmation when exiting
- now, we've fixed the code to keep a dynamic scratch member,
- long term, we should get rid of the scratch model, but this still
  allows us to fix the bug for now
2024-07-02 08:30:53 +02:00
Kevin Ansfield
2fd9116499
🐛 Fixed unwanted extra blank paragraphs when copy/pasting from Google Docs (#20505)
closes https://linear.app/tryghost/issue/ENG-1255

- updated Koenig packages including:
  - addition of `/preview` for public preview card
  - fix for HTML import from Google Docs
  - fix for embed thumbnails being cut off in email
  - fix for wide image card width on medium screens
- multiple fixes for unhandled (but non user-visible) errors causing noise in console and error logging
2024-07-01 21:14:07 +01:00
Steve Larson
3d9d552271
Improved performance in Admin Posts view (#20503)
ref https://linear.app/tryghost/issue/ONC-111
- changed posts fetching/display behavior to be client-side instead of server-side
- admin will issue (potentially multiple) requests based on the desired status(es)
- updated admin acceptance test for missing coverage

I've pulled the sort from the database query as this triple sort
performs very poorly at scale (taking ~4s+ past ~20k posts sometimes).
Instead, we now split up the fetch to grab only one status at a time and
use the front-end logic to handle displaying scheduled, then drafts,
then published. This should result in a much more responsive view.

We will separately change the default sort on the Admin API as that was the ultimate intent for this change.
2024-07-01 19:43:41 +00:00
Sag
7f963e9c2a
🎨 Added 'Changed email address' event to Member Activity (#20493)
fixes https://linear.app/tryghost/issue/ENG-1256

- when a member changes their email address, surface it in Member
Activity
2024-07-01 15:33:33 +00:00
Daniel Lockyer
fcb95ecc1a Switched faker to @faker-js/faker
- `faker` was the original dependency but the maintainer ended up
  deleting the repo, so development continued in `@faker-js/faker`
- we're already using that dependency, so we can make a few simple
  changes and remove the old dependency from our repo
2024-07-01 14:49:42 +02:00
Sanne de Vries
95a4895e8f
Center aligned feature image in email template (#20491)
REF DES-380
- Center aligned feature image in email template
- Updated feature image css in editor to better display image overlay
and improve caption spacing
2024-07-01 08:43:26 +00:00
Daniel Lockyer
5f36bef451 Changed "commented" link in member feed to redirect to post
fix https://linear.app/tryghost/issue/ENG-1217/activity-log-link-for-comments-goes-to-wrong-place

- the post analytics page does not contain any comments, so it's not the
  most intuitive location to point the user. Instead, we can send them
  to the frontend of the post, where they can view comments
2024-07-01 10:15:46 +02:00
Ghost CI
0d60c74957 v5.87.0 2024-06-28 16:27:27 +00:00
Daniel Lockyer
34b903a12b Added browser autoplay error to Sentry ignore list
fix https://linear.app/tryghost/issue/SLO-179/notallowederror-the-request-is-not-allowed-by-the-user-agent-or-the

- this adds another browser error to the Sentry ignore list, as we don't
  have control over it, and it doesn't affect the user
2024-06-27 15:33:35 +02:00
renovate[bot]
430a2ca383 Update dependency testem to v3.15.0 2024-06-27 14:06:48 +02:00
Daniel Lockyer
f9a6610823 Added AbortError to list of excluded errors
fix https://linear.app/tryghost/issue/SLO-175/error-aborterror-the-operation-was-aborted

- this error can occur when a user's browser navigates away mid-request,
  which causes the request to be aborted. However, we don't control
  this, nor do we particularly care, so we can just ignore it
2024-06-27 11:58:02 +02:00
Daniel Lockyer
aa0110c842 Adjusted Sentry ignore list to cover more browser play errors
fix https://linear.app/tryghost/issue/SLO-172/error-aborterror-the-play-request-was-interrupted-because-the-media

- there are a few error messages we can ignore here, as browsers output
  slightly different messages for various types of these errors, which
  don't affect the user
2024-06-27 08:59:58 +02:00
renovate[bot]
dfc27b02c8
Update Koenig packages (#20453)
closes https://linear.app/tryghost/issue/MOM-247

- includes a few fixes for errors we've seen in our reporting
2024-06-26 14:48:17 +01:00
Daniel Lockyer
f250898a3b Optimized stats aggregation code for Admin dashboard
fix https://linear.app/tryghost/issue/SLO-168/rangeerror-maximum-call-stack-size-exceeded

- this code takes the API output and reduces it down to collect together
  stats per date
- the current code is recursive, and we've seen errors with the
  recursion hitting a `RangeError: Maximum call stack size exceeded`
  error
- as well as that, we're doing a lot of array concat'ing and cloning,
  which burns memory and CPU time
- instead, we can just use `.reduce`
- the new implementation is much faster than the existing one (1ms vs
  85ms) and uses no recursion, so those errors should go away
- I've also verified that the output is the same between the two
  functions
2024-06-26 15:46:39 +02:00
Daniel Lockyer
43bb83f7bb Extracted stats aggregation function to util
ref https://linear.app/tryghost/issue/SLO-168/rangeerror-maximum-call-stack-size-exceeded

- this extracts a function to a util so we can unit test it
- this function is about to be optimized but having unit tests allows us
  to make the change with confidence
2024-06-26 15:46:39 +02:00
Daniel Lockyer
019f417c7d Moved error exclusion to correct place
- adding it to ignoreErrors is better than beforeSend because it's built
  for this purpose and we've just looking at the error message
2024-06-26 12:43:55 +02:00
Daniel Lockyer
dd39576de0 Added more errors to Sentry exclusion list
fix https://linear.app/tryghost/issue/SLO-165/add-more-errors-to-allowlist

- we don't want to capture Sentry errors for these because they are out
  of our control (like the user's internet connection dropping out)
2024-06-26 12:43:55 +02:00
Daniel Lockyer
5f5293cf6d Excluded errors caused by browser power-saving settings
fix https://linear.app/tryghost/issue/SLO-164/error-aborterror-the-play-request-was-interrupted-because-video-only

- in the case that the browser has power-saving settings enabled, we get
  an error in Sentry
- this error does not affect the user experience, so it should be safe
  to ignore
- this adds an exclusion to Sentry to ignore these errors
2024-06-26 11:49:42 +02:00
Daniel Lockyer
6c07b1cff9 Fixed TypeError when editor is focussed when not loaded
fix https://linear.app/tryghost/issue/SLO-162/typeerror-thiseditorapi-is-null

- if the editor does not load for some reason (network issue), and the
  editor area is clicked, we throw an error because we don't protect
  against a null `editorAPI`
- this adds that check
2024-06-26 11:49:42 +02:00
Ronald Langeveld
6099a14082
Fixed flaky admin test in Publish+Send Flow (#20463)
ref ONC-109

- Attempt to fix flaky Admin test, "Publish flow members enabled can
schedule publish+send"
- Adjusted the time calculation to the nearest minute to avoid
off-by-one minute errors
- Added `waitFor` to ensure elements are present and stable before
making assertions.
- Rounded the new scheduled date and time to the nearest minute to
maintain consistency
- Included extra `waitFor` and `settled` calls to allow time for UI
elements to fully load and reflect changes before assertions.
2024-06-26 16:05:51 +07:00
Sanne de Vries
df16fe1cf4
Added contentVisibility feature flag to FeatureService (#20465)
REF MOM-221
2024-06-26 08:37:01 +00:00
Sanne de Vries
03113313ce
🎨 Updated editor toolbar and action button designs (#20405)
REF https://linear.app/tryghost/issue/MOM-238

- Updated feature image action button styles
- Aligned button and tooltip styles with the rest of the editor
- Updated `koenig-lexical` version to pull in new toolbar design
2024-06-25 10:26:30 +00:00
renovate[bot]
68dcec143e Update dependency ember-auto-import to v2.7.4 2024-06-25 11:39:52 +02:00
Sag
516a2e1ff6
Reduced Sentry replays sample rate to 50% (#20458)
fixes https://linear.app/tryghost/issue/SLO-156
- we have reached our 10k replays per month quota in 20 days, by using a
100% error sampling rate
- we would need a sampling rate < 0.64% to stay under the quota
- from now on, we will be using a 50% error sampling rate to have a bit
of margin, and have a rounder number that is easier to reason about (1
out of 2 error sessions are recorded in Sentry)
2024-06-25 10:52:34 +02:00
Kevin Ansfield
21a2a8236e Added analytic events to internal linking feature
closes https://linear.app/tryghost/issue/MOM-77
closes https://linear.app/tryghost/issue/MOM-78

- bumps Koenig to support events
- adds `siteUrl` pass-through to Koenig to allow differentiation between internal and external URLs
2024-06-24 21:46:15 +01:00
Sag
b9240271fe
Added config to hide labels from the signup card for contributors (#20429)
ref https://linear.app/tryghost/issue/SLO-127

- problem: contributors see an empty list of labels in the Signup card,
even if some exist
- cause: contributors do not have permission to browse labels
- solution: hide the label input entirely for contributors in the Signup
card, based on the new `renderLabels` config parameter
2024-06-24 14:14:09 +00:00
Ghost CI
bfd7a26370 v5.86.2 2024-06-23 20:39:22 +00:00
Ghost CI
7dcc82b951 v5.86.1 2024-06-21 21:27:33 +00:00
Ghost CI
a837cf0247 v5.86.0 2024-06-21 16:04:16 +00:00
renovate[bot]
ccf2d22f4b Update sentry-javascript monorepo to v7.118.0 2024-06-21 13:07:47 +01:00
Sag
1c972c7dd1
🐛 Fixed button URL suggestions not loading for contributors, editors and authors (#20416)
ref https://linear.app/tryghost/issue/SLO-127

- problem: when using a card with a button (Button, Email CTA, Header,
Product), the Button URL suggestions fail to load for Contributors,
Authors, and Editors
- cause: Contributors, Authors and Editors don’t have permission to
fetch offers, and this causes the entire list of button url suggestions
to break
- solution: if offers fail to fetch for any reason, the rest of the url
suggestions for cards with a button is now still populated (i.e. offers
URLs are ignored)
2024-06-20 14:22:41 +02:00
Kevin Ansfield
524fe6ee19 Cleaned up onboardingChecklist GA labs flag
no issue

- removed labs flag
- removed labs flag conditionals
- removed code related to old setup/done screen
- fixed tests that weren't correctly running against the GA flag code
2024-06-20 11:42:42 +01:00
Kevin Ansfield
643b80ad4c 🐛 Fixed dashboard appearing blank if members disabled before completing onboarding
closes https://linear.app/tryghost/issue/ONC-106

- moved onboarding display outside of the `isMembersEnabled` conditional block
2024-06-20 10:43:58 +01:00
Ghost CI
be79f385f2 Merged v5.85.2 into main 2024-06-19 23:16:28 +00:00
Ghost CI
0c61e0cf59 v5.85.2 2024-06-19 23:16:27 +00:00
renovate[bot]
ae6e7d9134 Update dependency webpack to v5.92.1 2024-06-19 16:55:02 +00:00
Kevin Ansfield
a896e1ccb7 Added "@" shortcut to trigger internal linking search (beta)
no issue

Typing "@" in the editor will immediately trigger an internal link search to make it faster to link to one of your articles. After typing "@" continue typing to search, results can be selected using Up/Down arrow keys or the mouse, then pressing Enter or clicking will insert the selected result's title pre-linked. Pressing Escape or moving the cursor out of the search box will cancel the search.

- removed labs flag
- updated Koenig feature flag for at-linking to use the same flag as our internal linking beta
2024-06-19 14:58:04 +01:00
renovate[bot]
ace8a2fb65
Update Koenig packages (#20415)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@tryghost/kg-default-cards](https://togithub.com/TryGhost/Koenig/tree/master#readme)
([source](https://togithub.com/TryGhost/Koenig)) | [`10.0.5` ->
`10.0.6`](https://renovatebot.com/diffs/npm/@tryghost%2fkg-default-cards/10.0.5/10.0.6)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@tryghost%2fkg-default-cards/10.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@tryghost%2fkg-default-cards/10.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@tryghost%2fkg-default-cards/10.0.5/10.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@tryghost%2fkg-default-cards/10.0.5/10.0.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@tryghost/kg-default-nodes](https://togithub.com/TryGhost/Koenig/tree/main#readme)
([source](https://togithub.com/TryGhost/Koenig)) | [`1.1.2` ->
`1.1.3`](https://renovatebot.com/diffs/npm/@tryghost%2fkg-default-nodes/1.1.2/1.1.3)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@tryghost%2fkg-default-nodes/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@tryghost%2fkg-default-nodes/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@tryghost%2fkg-default-nodes/1.1.2/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@tryghost%2fkg-default-nodes/1.1.2/1.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@tryghost/kg-html-to-lexical](https://togithub.com/TryGhost/Koenig/tree/main#readme)
([source](https://togithub.com/TryGhost/Koenig)) | [`1.1.3` ->
`1.1.4`](https://renovatebot.com/diffs/npm/@tryghost%2fkg-html-to-lexical/1.1.3/1.1.4)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@tryghost%2fkg-html-to-lexical/1.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@tryghost%2fkg-html-to-lexical/1.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@tryghost%2fkg-html-to-lexical/1.1.3/1.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@tryghost%2fkg-html-to-lexical/1.1.3/1.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@tryghost/kg-lexical-html-renderer](https://togithub.com/TryGhost/Koenig/tree/main#readme)
([source](https://togithub.com/TryGhost/Koenig)) | [`1.1.3` ->
`1.1.4`](https://renovatebot.com/diffs/npm/@tryghost%2fkg-lexical-html-renderer/1.1.3/1.1.4)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@tryghost%2fkg-lexical-html-renderer/1.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@tryghost%2fkg-lexical-html-renderer/1.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@tryghost%2fkg-lexical-html-renderer/1.1.3/1.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@tryghost%2fkg-lexical-html-renderer/1.1.3/1.1.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@tryghost/koenig-lexical](https://togithub.com/TryGhost/Koenig/tree/master#readme)
([source](https://togithub.com/TryGhost/Koenig)) | [`1.2.6` ->
`1.2.7`](https://renovatebot.com/diffs/npm/@tryghost%2fkoenig-lexical/1.2.6/1.2.7)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@tryghost%2fkoenig-lexical/1.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@tryghost%2fkoenig-lexical/1.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@tryghost%2fkoenig-lexical/1.2.6/1.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@tryghost%2fkoenig-lexical/1.2.6/1.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>TryGhost/Koenig (@&#8203;tryghost/kg-default-cards)</summary>

###
[`v10.0.6`](https://togithub.com/TryGhost/Koenig/compare/@tryghost/kg-default-cards@10.0.5...@tryghost/kg-default-cards@10.0.6)

[Compare
Source](https://togithub.com/TryGhost/Koenig/compare/@tryghost/kg-default-cards@10.0.5...@tryghost/kg-default-cards@10.0.6)

</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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/TryGhost/Ghost).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MTAuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQxMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-19 12:00:21 +00:00
Peter Zimon
962365e6ea
Fixed "What's new" notification for contributors (#20413)
DES-363

The "What's new" notification took up the whole width of the admin for
contributors and it wasn't possible to interact with it.
2024-06-19 11:18:02 +00:00
Steve Larson
783984d4d3
Added Sentry logging for unsaved changes modal in admin (#20408)
ref https://linear.app/tryghost/issue/ONC-94
- adds Sentry logging for the unsaved changes modal in Admin (tags,
members, collections)

This will let us monitor for spikes in rates so we know if a change to
Ghost has caused faulty logic in detecting dirty models.
2024-06-18 13:44:43 -05:00