Commit Graph

35997 Commits

Author SHA1 Message Date
renovate[bot]
9f85124a2e Update dependency vitest to v0.34.1 2023-08-09 09:54:48 +02:00
renovate[bot]
93948948a2 Update dependency inquirer to v8.2.6 2023-08-09 09:51:09 +02:00
renovate[bot]
ca7d829915 Update dependency vite to v4.4.8 2023-08-09 09:50:54 +02:00
renovate[bot]
ce97a10819 Update storybook monorepo to v7.2.0 2023-08-09 09:50:44 +02:00
Chris Raible
9ea4fbd7a7
Added feature to convert and open mobiledoc posts in the lexical editor (#17453)
refs TryGhost/Product#3638

- Added `convert_to_lexical` flag to the posts/pages edit endpoint
- Added 'convertToLexical' feature flag so we can enable/disable this
feature independently from the main lexical beta flag
- Modified admin posts/pages list to point to the lexical editor for
_all_ posts, regardless of mobiledoc vs lexical (if the flag is on)
- Added call to edit endpoint with `convert_to_lexical` in the lexical
editor admin route if the page/post is currently in mobiledoc and the
flag is enabled
2023-08-08 15:44:54 -07:00
Jono M
d8259fb4fe
Colocated AdminX types and helpers with API requests (#17629)
refs https://github.com/TryGhost/Product/issues/3349
2023-08-08 21:34:07 +01:00
Sam Lord
116d11b6ab Allows unknown local cache when testing with Nx
refs: https://github.com/TryGhost/DevOps/issues/55

The documentation for this feature is here: https://nx.dev/recipes/troubleshooting/unknown-local-cache

Ideally, we'd use a remote cache, but we can just share to local cache since it's being shared by identical machines.
2023-08-08 17:57:33 +01:00
Djordje Vlaisavljevic
df231b2459
Tips & donations feedback tweaks (#17633)
refs https://github.com/TryGhost/Product/issues/3666,
https://github.com/TryGhost/Product/issues/3667

- Updated copy in various places
- Added logic for displaying "Connect Stripe" button instead of "Expand"
if not already connected
2023-08-08 14:49:58 +01:00
Simon Backx
4c8179312d
🎨 Added support for relative links in emails (#17630)
fixes https://github.com/TryGhost/Product/issues/3687

After this change, relative URLs in emails will be replaced with
absolute URLs using the post URL. Making relative Portal URLs possible
etc.

Updates the test data generator to fix invalid URL encoding (somehow a
backslash + escaped double quote was added when it wasn't required).
2023-08-08 13:22:56 +02:00
Sodbileg Gansukh
7d08b4a2fc Fixed background repeat of split header email 2023-08-08 18:50:44 +08:00
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
Jono M
2ccb04ed7f
Added tests for code injection (#17623)
refs https://github.com/TryGhost/Product/issues/3688
2023-08-08 10:08:19 +01:00
Sodbileg Gansukh
209649c556 Adjusted padding of the split header content 2023-08-08 16:08:14 +08:00
Peter Zimon
cb21763865
Added AdminX code injection section (#17596)
refs. https://github.com/TryGhost/Product/issues/3688

---------

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
2023-08-08 08:14:46 +01: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
Jono M
a413f2b54f
Added tests for Stripe and Newsletter settings (#17598)
refs https://github.com/TryGhost/Product/issues/3608,
https://github.com/TryGhost/Product/issues/3601
2023-08-07 12:44:30 +01: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
Djordje Vlaisavljevic
f953fedd8f
Updated Tips&Donations portal loading state (#17605)
refs https://github.com/TryGhost/Product/issues/3677

- Removed text from the loading state
2023-08-07 09:46:45 +01: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
Jono M
cf947bc4d6
Optimised react-query caching to prevent excessive requests (#17595)
refs https://github.com/TryGhost/Product/issues/3349
2023-08-04 12:24:19 +01:00
Peter Zimon
77cc6df64a
AdminX Newsletters refinements (#17594)
refs. https://github.com/TryGhost/Product/issues/3601

- added tableCell hover pointer cursor
- updated Stripe connect button copy
- added bottom margin to main container for better scrolling / navigation highlighting
2023-08-04 11:42:54 +02:00
Djordje Vlaisavljevic
24ea4c0fb9
Updated Tips&Donations portal success and loading states design (#17592)
refs https://github.com/TryGhost/Product/issues/3677

- Updated portal loading design when user clicks on a Tips&Donations
link
- Removed "Retry" button from error state and added "Close"
2023-08-03 22:46:26 +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
7f6de07b1e
Removed unconsistent success state from the donation page (#17590)
refs https://github.com/TryGhost/Product/issues/3650
2023-08-03 21:00:42 +00: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
c06ba9bec9
2023 (2) 2023-08-03 21:04:20 +01:00
John O'Nolan
265e62229f
2023 2023-08-03 20:40:44 +01:00