Commit Graph

39155 Commits

Author SHA1 Message Date
Chris Raible
37b170c381 Added type checks to admin-x-design-system unit tests 2024-08-30 11:25:18 -07:00
Chris Raible
03c388db91
Updated yarn.lock (#20885)
no issue

- Running `yarn` on `main` was making changes to the `yarn.lock` file
without any code/dependency changes — committing those changes to fix
this.
2024-08-30 11:23:17 -07:00
Ghost CI
bf4e6600a9 v5.91.0 2024-08-30 15:05:40 +00:00
Hannah Wolfe
0720bc2bdb
Updated multi-tenant param name for stats charts
ref https://linear.app/tryghost/issue/ANAL-27/setup-tinybird-project-and-cicd

- We've settled on a name for the param of site_uuid
- Need to update the chart code that was added prior to this final decision
2024-08-30 11:23:27 +01:00
Hannah Wolfe
08bf49eaec
Added full suite of tinybird datasources and pipes (#20882)
ref
https://linear.app/tryghost/issue/ANAL-27/setup-tinybird-project-and-cicd
ref
https://github.com/tinybirdco/web-analytics-starter-kit/blob/main/tinybird/pipes/analytics_sessions.pipe

- These datasources and pipes work together to define the main endpoints
we need for our stats dashboard
- They are based on the web analytics starter kit from tinybird
- We've updated them to handle site_uuid
- There's more to do to pipe the member-related and post-related data
through the system yet
2024-08-29 22:03:31 +01:00
Hannah Wolfe
f79f5471b4
Added stats tracker script to ghost head (#20881)
closes
https://linear.app/tryghost/issue/ANAL-9/initial-tracker-in-ghost-head

- Given that all of the correct config is in place, output a tracking
script
- This allows us to send pageview events into tinybird
- All of the details (location of the script, destination etc) are kept
in config so that it's easy to change for different environments
2024-08-29 21:40:41 +01:00
Sodbileg Gansukh
d30164df97
Improved publishing flow (#20878)
ref DES-706

* After a user publishes or schedules a post, they are directed to the post list
* If a post is sent as an email, they are directed to the Analytics page
* In both cases, a confirmation modal is shown
* If a post is published, they can share it directly from the confirmation modal
* Added a "Share" button and some additional functions (view, edit, and delete post) to
published posts in post analytics
* Added a manual "Refresh" button to post analytics so that there is
no need to reload the whole app to update the data

---------

Co-authored-by: Sag <guptazy@gmail.com>
2024-08-29 21:17:16 +02:00
Steve Larson
c2ae91e4db
Added config flag to disable recommendations service (#20879)
no ref

This service can get rather noisy when doing local development with our
data generator, as we do not use real urls, and therefore generate a lot
of not found errors in the console.
2024-08-29 17:51:23 +00:00
Hannah Wolfe
79f4b523ac
Added analytics_events tinybird datasource
ref https://linear.app/tryghost/issue/ANAL-27/setup-tinybird-project-and-cicd
ref https://www.tinybird.co/docs/concepts/data-sources

- This is our main datasource, where we'll store events that come in as people browse around Ghost
- It's defined using tinybird's format, and then deployed out to tinybird using `tb deploy`
2024-08-29 17:20:16 +01:00
Sanne de Vries
b79534387d Updated notification email mobile styles
ref https://linear.app/tryghost/issue/PLG-200
2024-08-29 17:15:45 +01:00
Kevin Ansfield
0647172ca8 Added style inlining to staff service emails
no issue

- uses same `juice` version that we use in our newsletter emails
2024-08-29 17:15:45 +01:00
Hannah Wolfe
e41984d0a5
Initial tinybird setup
ref https://linear.app/tryghost/issue/ANAL-27/setup-tinybird-project-and-cicd

- Tinybird has a system for managing it's configuration as code, with full ci/cd support
- The tinybird CLI tool uses python, so we'll run that using docker, via `yarn tb`
- Some of the files tinybird adds should not be in source control, so we've added those to git ignore
- Everything in /ghost/tinybird is tinybird's init config
2024-08-29 16:56:51 +01:00
Hannah Wolfe
9d121d8e9a
Added initial Stats page to Ghost Admin (#20877)
closes
https://linear.app/tryghost/issue/ANAL-10/stats-page-in-ghost-admin

- Adds all the structure, logic and permissions tests for the Stats page
to check we're loading the right thing at the right time
- Adds @tinybirdco/charts as a dependency, and has a single example of a
chart setup using the right config
2024-08-29 12:56:39 +01:00
Daniël van der Winden
42009eb9ed
Updated subtitle logic (#20876)
It was previously not displaying the correct text for when a post is
published + emailed. That's solved now.
2024-08-29 10:41:02 +00:00
Hannah Wolfe
3e25370ebe
Added initial stats config to API (#20875)
closes https://linear.app/tryghost/issue/ANAL-8/flag-and-config

- This checks if tinybird:stats is set, and if so passes through the
config that is set via the config API
- This is used by Ghost admin to configure where to pull charts from
2024-08-29 11:37:28 +01:00
Daniel Lockyer
0a6cd75993 Gated NestJS framework behind environment variable
- we added NestJS to Ghost as a way forwards for a new framework within
  Ghost but we haven't added much to it
- requiring all the NestJS code adds about 6-9% to our boot time, so if
  we're not using it, it's just time we're burning for no benefit
- for now, I've gated this behind an env var to prevent it from loading
- we can't use labs flags in the boot process, so I've gone for an env
  var
2024-08-29 12:18:42 +02:00
Daniël van der Winden
d92f8bcf0a
Updated button colours and hover states (#20873) 2024-08-29 10:05:52 +00:00
Sanne de Vries
2b90ca9082
Updated member link styling in donation email (#20872)
REF PLG-202
- Removed underline from member link
- Changed &rarr; to &bull;
2024-08-29 09:58:40 +00:00
Daniel Lockyer
77df6186f0 Removed auto-labeller for PRs
- this was an early attempt to group PRs together by labels, so we can
  triage PRs easier, but it's not finished and actually producing more
  noise than signal
- we might want to re-add this in the future, but for now, silence 🧘
2024-08-29 11:06:00 +02:00
Fabien O'Carroll
2d00d5ca0e Fixed welcome email being sent for Admin API creates
ref https://linear.app/tryghost/issue/ONC-274

This fix is done at the endpoint layer, which isn't ideal, but has the smallest
surface area for the change. I think we may want to move it up a layer though,
despite the extra complications. If we move the check _into_ the MembersAPI
class however, we start to run into issues with circular dependncies due to the
mess that is our dependency injection approach with the Members service
2024-08-29 16:05:27 +07:00
Fabien O'Carroll
3adc0c0441 Added breaking test for sending welcome emails
ref https://linear.app/tryghost/issue/ONC-274

This test checks that a welcome email is not sent when adding a member via the
Admin API if the site is in need of email verification, regardless of whether
or not the flag to send an email is set.

It is currently failing to demonstrate the whole in our logic.
2024-08-29 16:05:27 +07:00
Fabien O'Carroll
b012da023d Cleaned up settings cache after test
All tests after this one were in a non-sending email state, which luckily
doesn't affect these tests, but it will affect future ones! This just cleans up
the settings so that they're back to a standard default.
2024-08-29 16:05:27 +07:00
Hannah Wolfe
2720791434
Updated CI workflow to run on PR label/unlabel
- We have browser tests which only run if the browser tests flag is added to the PR
- The label has to be present on PR creation, which is hard to remember/doesn't fit with various workflows
- The default type of action for the pull_request trigger are opened, synchronize, reopened
- This PR adds labeled and unlabeled to those, which I think will help us to run the tests as expected
- The expectation is that adding the browser test label will now trigger the tests to run
2024-08-29 09:24:37 +01:00
Ronald Langeveld
8e1a730731
Fixed hanging dash when no attribution is present (#20869)
ref PLG-198

- Fixed trailing dash when no attribution is present
2024-08-29 15:22:31 +09:00
Sodbileg Gansukh
7be7112e68
Fixed non-email analytics error when refreshed (#20868)
ref DES-756, DES-757

- made the email property to make the refresh work properly for published-only posts
- included sentiment in the query to update the feedback percentage when refreshed
2024-08-29 04:49:06 +00:00
Chris Raible
dd714ef543
Added test-results directories to .gitignore (#20867)
no issue

- These directories are made when running browser tests locally — added
to `.gitignore` so we don't accidentally commit our local test results
to version control
2024-08-28 16:04:19 -07:00
Kevin Ansfield
0d091992f2 Shipped new Portal version 2024-08-28 17:54:58 +01:00
Sanne de Vries
0532e4063f
Fixed potential orphaned words in notification email titles (#20860)
REF PLG-150
2024-08-28 16:03:37 +00:00
Sanne de Vries
8ddbf471dd
Updated donation success modal styles (#20859)
REF PLG-152
2024-08-28 15:48:57 +00:00
Kevin Ansfield
c689414497
Added missing translation entries for Portal field placeholders, labels, and errors (#20858)
no issue

- added `t()` around static strings to allow them to be translated
- updated translation files, with context provided in `context.json`
2024-08-28 15:43:03 +00:00
Sanne de Vries
76f9b7982b
Updated donation email CTA's (#20857)
REF PLG-160
- Added link to member profile next to name in donation email
- Added "Say thanks" CTA to donation email without message
2024-08-28 16:37:25 +02:00
Hannah Wolfe
0a7093b7dd
Updated Config API testing to use snapshot + unit tests (#20854)
- Swap the e2e config API test to use our newer framework, and match against a
snapshot for the default case
- Move the individual test cases to unit tests (new file) - there are more to add
here, but this is parity with what we had before
- We use unit tests for checking through various cases for how config
changes modify the output as this is faster and more explicit
2024-08-28 14:29:17 +01:00
Hannah Wolfe
ac345aa84d Removed unused billing url from config API
ref 40cedb84ff (diff-dba52cb217f89ed45931ded5618ce83294fc32cf4a8dec73aa605c65441331b3R43)
ref 639be25f1d/ghost/core/core/server/api/endpoints/utils/serializers/output/config.js

- This was moved under hostSettings very early on in development and should have been cleaned up
- As this property wasn't listed in the output serializer, we know it's not being used anywhere
- We can see from the limit code that it looks for hostSettings.billing.url
2024-08-28 13:49:13 +01:00
Hannah Wolfe
9e45822dbb
Removed unused items from config API (#20851)
ref 
639be25f1d
ref
f705dda314

- These items are never returned from the API as they've been removed
from the serializer
- The tests also check that they are not present
- They were removed by the referenced commits, which changed how these
things were built
2024-08-28 13:25:05 +01:00
Ronald Langeveld
e8e1b8ea2f
Added donation message to Stripe and Email (#20828)
ref PLG-160

- Refactored donation handling logic to be processed within the
`checkout.session.completed` webhook event.
- Added support for capturing and storing donation messages from Stripe
sessions.
- Integrated donation messages into the email notifications sent to
staff.
- Added database integration.
- Removed redundant donation logic from the invoice.payment_succeeded
webhook, since custom fields isn't supported.
- Updated and added new tests

---------

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
2024-08-28 21:08:42 +09:00
Kevin Ansfield
32edc12cc2 Fixed error closing donation success modal
no issue

- when redirecting from Stripe back to Ghost after making a donation the URL contained a double slash (`//#/portal/...`) which triggered browser security errors when Portal modified the browser history stack when navigating
- the above could prevent the donation success modal from closing
2024-08-28 12:38:14 +01:00
renovate[bot]
1871269e8f
Update Koenig packages (#20849)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-28 13:10:57 +02:00
Sodbileg Gansukh
3b38ba3a29
Make split number helper handle empty value (#20848)
no issues
2024-08-28 10:47:03 +00:00
Daniël van der Winden
5cc3d943f2
Made the post preview card a link (#20846)
The modal in the new publish flow has a post preview card, which did not
link to the post itself. It does now (except when it's an email).
2024-08-28 10:08:25 +00:00
Kevin Ansfield
2b2e5dfeb1 Updated Portal readme with more testing/releasing details 2024-08-28 10:37:04 +01:00
Sodbileg Gansukh
1afe96ae34
Added animation to the analytics numbers when refreshed (#20842)
ref DES-709

- when refresh button is clicked, the numbers in the analytics will be animated if changed
- for the animation to be performant, added a new dependency "animejs"
- to minimize the flash and layout shift, the analytics data is kept as it is while loading
- once finished loading, it will be replaced with the new data
2024-08-28 17:25:37 +08:00
Daniël van der Winden
1d17600f5d
Publishing flow: Social buttons update (#20841)
Updated the hover colour of the social buttons in the new publishing
flow's modal.
2024-08-28 08:42:56 +00:00
Michael Barrett
59a3a9514b
Added data retrieval for activitypub activities (#20830)
refs
[AP-283](https://linear.app/tryghost/issue/AP-283/handle-incoming-likes)

Added data retrieval for activitypub activities in the acvitiies tab of
the ActivityPub demo
2024-08-28 09:39:01 +01:00
renovate[bot]
cfda52ead2 Update dependency gscan to v4.43.3 2024-08-28 10:10:54 +02:00
Ronald Langeveld
41e696f00f
Added migration to include donation_message in donation_payment_events (#20839)
ref PLG-197

- DB migration to add `donation_message` to `donation_payment_events`
table
2024-08-28 15:58:11 +09:00
Chris Raible
a79ab03463
Fixed failing type check in admin-x-design-system story (#20838)
no issue

- The type checks for `admin-x-design-system` were failing for me locally for a Storybook story. It looks like we changed the `PopoverPosition` type to use 'start'/'end' rather than 'left'/'right', but this story was still using 'left'. This was causing `yarn test` to fail in the `admin-x-design-system` app.
- This commit updates the story to use 'start' instead of 'left', which allows the type checks to pass.
2024-08-27 17:58:42 -07:00
Steve Larson
962194b595
Bumped Portal (#20837)
no ref
2024-08-27 21:29:40 +00:00
Ghost CI
291d48ecb7 Merged v5.90.2 into main 2024-08-27 21:29:17 +00:00
Ghost CI
eaf414a2de v5.90.2 2024-08-27 21:29:15 +00:00
Steve Larson
8a1274517d
🐛 Added integrity token to one click subscribe (#20836)
ref https://linear.app/tryghost/issue/ONC-269

When we added the integrity token to all `send-magic-link` callers in
Portal, we missed one.
2024-08-27 21:17:19 +00:00