Commit Graph

18391 Commits

Author SHA1 Message Date
Ronald Langeveld
d5026068da
Updated Koenig packages (#17626)
no issue

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 2f86a35</samp>

Updated packages for rendering post and page content. This fixes some
bugs and improves the handling of HTML elements.
2023-08-08 11:20:53 +02:00
Sodbileg Gansukh
209649c556 Adjusted padding of the split header content 2023-08-08 16:08:14 +08:00
Sag
9aef028c4c
Renamed Tips & Donations suggestion links (#17618)
refs https://github.com/TryGhost/Product/issues/3665
2023-08-07 17:04:26 +00:00
Sag
f386a92f98
Fixed preset amount for donations (#17617)
refs https://github.com/TryGhost/Product/issues/3666
2023-08-07 16:19:19 +00:00
Sag
3254b8e149
Added Tips & Donations link to Button, Header and Email CTA cards suggestions (#17614)
closes https://github.com/TryGhost/Product/issues/3665

- added link suggestion feature to the Header card in Mobiledoc (missing
feature)
- Tips & Donations link is behind a feature flag atm, to be cleaned up
once the feature is ready to be released
2023-08-07 15:16:29 +00:00
Sag
c201e4eb4f
Fixed preset amount in Stripe Checkout (#17615)
refs https://github.com/TryGhost/Product/issues/3666

- Stripe has a set of minimum charges per currency. This adds a basic
safeguard on the backend side, while the main validation should happen
in Portal
- Stripe docs:
https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts
2023-08-07 16:48:25 +02:00
Simon Backx
5462bc0a96 Added email notification for new donations
fixes https://github.com/TryGhost/Product/issues/3692
2023-08-07 16:32:35 +02:00
Simon Backx
97580a3cd8 Added toggle for donation email notifications
refs https://github.com/TryGhost/Product/issues/3692
2023-08-07 16:32:35 +02:00
Simon Backx
66675a1383
Added donation notifications column (#17607)
fixes https://github.com/TryGhost/Product/issues/3691

When a site receives a donation, we'll send an email to all
administrator. They can disable this in their profile settings. This
migration adds the required column to make this possible. It defaults to
true.

Link to tech spec:
https://www.notion.so/ghost/Tech-Spec-5cd6929f7960462ebcbf198176e0d899?pvs=4#156834b0231d4968a203d797c6817d21
2023-08-07 15:31:36 +02:00
Ronald Langeveld
b889e9bf83
Updated header email rendering package (#17613)
no issue

- some tweaks inside `kg-default-nodes`, requires an update in Ghost.

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
copilot:summary
2023-08-07 13:12:57 +00:00
Sag
ecc9c4aee5
Released Portal 2.34.0 (#17610)
no issue

- this version contains a WIP version of the Tips & Donations feature
2023-08-07 12:59:39 +00:00
Ronald Langeveld
5d6c38b99f
Bumped Koenig Packages (#17608)
no issue

- made adjustment to `kg-default-nodes` that needs bumping on Ghost to
have those changes reflected.
 
---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 77ea2d6</samp>

Updated Koenig Editor dependencies to fix bugs and enhance performance.
This affects the `@tryghost/kg-default-nodes` and
`@tryghost/kg-lexical-html-renderer` packages in
`ghost/core/package.json`.
2023-08-07 13:47:59 +02:00
Sam Lord
06011bf513 Fixed retried tests with snapshots in CI
refs: TryGhost/DevOps#53

Tests with snapshots which are retried in CI will no longer have false positive results
2023-08-07 11:57:22 +01:00
Simon Backx
c04d8532ca
🐛 Fixed member signup source attributed to Stripe (#17606)
no issue

When a user fails to pay the first time, and returns to the site, the
next payment will be attributed to Stripe instead of the original
referrer. This change always ignores the Stripe checkout as referrer in
the URL history.
2023-08-07 09:38:46 +00:00
Fabien 'egg' O'Carroll
2459d70048
Added CollectionPost model & relation to Collection (#17588)
By using the `collections_posts` table as a pivot table, I couldn't see
a way to get bookshelf to *not* load the Post models for the relation.
We don't actually need those Post models for our usescases, the the
queries were causing issues with our database servers! Here we've added
a new CollectionPost model which allows us to treat the
collections_posts table as a resource ratherthan pivot, and means we can
use the hasMany relation rather than belongsToMany relation. This
removes all queries to the posts table when fetching collections with
relations
2023-08-07 09:17:36 +01:00
Ronald Langeveld
a9d980f9c1
Bumped Koenig Packages (#17604)
no issue

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at ee5f8bf</samp>

Updated Koenig Editor dependencies in `package.json` to improve editor
performance and stability.
2023-08-07 07:09:21 +00:00
Sodbileg Gansukh
26e07a5f54 Better spacing for the header card 2023-08-07 10:49:32 +08:00
Sodbileg Gansukh
267d0fc045 Increased padding of the header card email 2023-08-07 08:37:57 +08:00
Sodbileg Gansukh
b9b959cd3c Header card email typography and spacing 2023-08-07 08:37:57 +08:00
Sodbileg Gansukh
013719f2db Reverted old header card styles and added explicit rules for the new card 2023-08-07 08:37:57 +08:00
Sodbileg Gansukh
4699f5b86e Added email styles for Header v2 2023-08-07 08:37:57 +08:00
Chris Raible
a4c04da443
Updated Posts Content API snapshots (#17600)
no issue

- Snapshot tests were incorrect but we weren't catching it because CI
was retrying them and yielding false passes
- This fix just fixes the broken tests, which will allow us to fix the
issue with CI yielding false passing results
2023-08-04 22:31:54 +00:00
Sag
81c3555106
Added logic for currency and suggested amount for Tips & Donations (#17599)
closes https://github.com/TryGhost/Product/issues/3666

- added computed setting "donations_enabled"
- added logic to persist "donations_suggested_amount" and "donations_currency"
- used  "donations_suggested_amount" and "donations_currency" when initiating a new Stripe Checkout for donations
- added copy functionality to "your link" in Tips & Donations settings
2023-08-04 18:17:35 +00:00
Ghost CI
299cdb4387 v5.58.0 2023-08-04 15:02:54 +00:00
Djordje Vlaisavljevic
dce2e68c9a
Added Tips&Donations link to portal links (#17580)
refs https://github.com/TryGhost/Product/issues/3677

- Added Tips&Donations link to Portal links in Membership settings for
easy access
- Updated other links to pass `no-action` lint rule

---------

Co-authored-by: Sag <guptazy@gmail.com>
2023-08-04 15:15:57 +01:00
Sam Lord
356256067c Data generator: Ensure order of newsletters is correct
no issue
2023-08-04 13:36:09 +01:00
Sam Lord
4ff467794f Entirely rewrote data generator to simplify codebase
refs: https://github.com/TryGhost/DevOps/issues/11

This is a pretty huge commit, but the relevant points are:
* Each importer no longer needs to be passed a set of data, it just gets the data it needs
* Each importer specifies its dependencies, so that the order of import can be determined at runtime using a topological sort
* The main data generator function can just tell each importer to import the data it has

This makes working on the data generator much easier.

Some other benefits are:
* Batched importing, massively speeding up the whole process
* `--tables` to set the exact tables you want to import, and specify the quantity of each
2023-08-04 13:36:09 +01:00
Djordje Vlaisavljevic
be7a2d0aec
Updated Tips & donations settings design (#17591)
refs https://github.com/TryGhost/Product/issues/3667

- Moved Tips&Donations out of `SignupFormEmbed` component and into its
own component
- Removed the enable/disable toggle for Tips&Donations and added
Expand/Close button instead
2023-08-03 22:37:25 +01:00
Sag
7e9b2d4883
Fixed donations checkout for logged-off readers (#17589)
closes https://github.com/TryGhost/Product/issues/3663
2023-08-03 20:45:57 +00:00
Sag
19bdb0efef
Added migrations for Tips & Donations' settings (#17576)
closes https://github.com/TryGhost/Product/issues/3668

- Tips and Donations feature offers two settings: "donations_currency", and "donations_suggested_amount"
    - "donation_currency": the currency to be used for the donation. Defaults to "USD", not nullable.
    - "donation_suggested_amount": an anchor price for the donation. Defaults to 0, not nullable.
- Both settings belong to a new group "donations"

Tech Spec: https://www.notion.so/ghost/Tech-Spec-5cd6929f7960462ebcbf198176e0d899?pvs=4#6e8b34c45f0c4c78b48c9e7725a307c8
2023-08-03 22:13:47 +02:00
John O'Nolan
265e62229f
2023 2023-08-03 20:40:44 +01:00
Steve Larson
af7ce52708
Added source to beta editor feedback (#17586)
no refs
- will return post, page, or settings
2023-08-03 10:10:31 -05:00
Djordje Vlaisavljevic
f26203f8cb
Updated Tips & donations settings (#17585)
refs https://github.com/TryGhost/Product/issues/3667

- Updated Tips & Donations settings with improved copy and more compact
layout
2023-08-03 15:28:11 +01:00
Michael Barrett
262c6be70f
🐛 Fixed member filtering on newsletter subscription status (#17583)
fixes https://github.com/TryGhost/Product/issues/3684

The `nql` used for filtering newsletter members needed tweaking to make
sure the provided query was parsed as a single `AND` query. This commit
also fixes an issue where on page reload the filters were not being
applied correctly
2023-08-03 13:26:19 +01:00
Ghost CI
81ef2ade39 Merged v5.57.3 into main 2023-08-03 10:25:36 +00:00
Ghost CI
34b6f1917f v5.57.3 2023-08-03 10:25:34 +00:00
Fabien "egg" O'Carroll
148cf059dc Disabled Collections sync when flag disabled
We've been seeing an increased number of database queries, which are potentially
caused by the collections syncing logic. Whilst we haven't narrowed the cause
down precisely we want to disable this logic unless the flag is enabled.
2023-08-03 11:08:25 +01:00
Djordje Vlaisavljevic
423607872c
Updated Tips & donations membership settings design (#17579)
refs https://github.com/TryGhost/Product/issues/3667

- Added static design for Tips & Donations settings with feature toggle,
default amount, currency and link
2023-08-02 22:44:52 +01:00
Steve Larson
c539417e89
🐛 Fixed bookmark card metadata styles (#17577)
refs TryGhost/Product#3609
- author and publisher styles were mixed up in mobiledoc
- made consistent for author coming after publisher for md and lexical
- updated renderer packages
2023-08-02 14:13:25 -05:00
Ghost CI
e2a6d8b987 Merged v5.57.2 into main 2023-08-02 15:12:37 +00:00
Ghost CI
afce648fd7 v5.57.2 2023-08-02 15:12:35 +00:00
Steve Larson
6936007052
🐛 Updated gscan error handling for page errors (#17575)
refs https://github.com/TryGhost/Product/issues/3676

- add filter for sidebar display of theme errors (angry red box)
- filter specific to each page feature, will need to add each one by this approach
2023-08-02 09:56:40 -05:00
Fabien "egg" O'Carroll
2cd50d47af 🐛 Fixed superfluous DB queries on Collection save
We have a global hook for the bookshelf-relations plugin which updates the
sort_order for pivot tables when saving the parent model. This hook requires
that we fetch each row in the pivot table related to the model and then run an
update on each one. Since we have a "latest" Collection this means at least N
update queries where N is the number of Posts for a site. For large sites this
was crippling the database. We only need the sort_order to be updated for
Collections with a type of "manual". We currently don't have a way to disable
the update based on model attributes, so instead we have disabled the update for
all Collections - this is okay because 1. Collections is not released and 2. we
don't have full support for manual Collections yet anyway.
2023-08-02 15:19:47 +01:00
Jono M
64d52d736a
Updated AdminX settings to link from the usual footer button (#17567)
refs https://github.com/TryGhost/Product/issues/3349

Now that we're a bit further, we can open AdminX settings from the usual
gearwheel button when the Labs flag is enabled instead of having a
separate navigation item
2023-08-02 11:43:06 +02:00
Ghost CI
f839c2289c Merged v5.57.1 into main 2023-08-01 19:57:00 +00:00
Ghost CI
c81baebdbb v5.57.1 2023-08-01 19:56:59 +00:00
Fabien 'egg' O'Carroll
ada5b838a5
🐛 Fixed custom routing with collections (#17561)
When we updated the way we handled NQL filter expansion, we broke custom
routing collections. This reverts the change and fixes custom routing.
2023-08-01 19:54:41 +01:00
Naz
346eeef2e3 Removed flatUrls labs flag
refs 4372a7e1a8

- We ended up developing a proper customizable routing on the `arch` branch. This flag is obsolete.
2023-08-01 15:13:15 +08:00
Naz
7464dbc1af Added e2e test coverage for bulk collection edits
refs https://github.com/TryGhost/Arch/issues/16

- Makes sure post bulk actions also update collection posts
2023-08-01 15:11:00 +08:00
Naz
aaf0998129 Fixed transaction completion error on collection update
refs https://github.com/TryGhost/Arch/issues/16

- Without an extra await in the update function the passed in transaction would complete before all updates had a chance to run within this transaction.
2023-08-01 15:11:00 +08:00