Commit Graph

240 Commits

Author SHA1 Message Date
Peter Zimon
6d6969f4b0
Portal signup page spacing fixes (#19791)
refs.
https://linear.app/tryghost/issue/DES-161/portal-signup-window-spacing-problem

The products section is returned even if there's only a free product in
the publication. This results in an extra, unnecessary space between the
signup form inputs and the signup button.
2024-03-04 16:27:30 +01:00
Steve Larson
c2f3ffaca7
🐛 Prevented newsletter subscriptions from getting out of sync in Portal (#19768)
refs https://linear.app/tryghost/issue/ENG-677
- UnsubscribePage is intended to be able to be used without logging in
to Portal. The app context (member state) was not synchronized when
logged in, causing conflicts in the client data vs. database.
- Now when a logged in member is found, the member object is manually
updated to reflect the API response(s).
2024-02-28 13:57:19 -06:00
Sag
99588a7852
Released Portal v2.37.4 (#19718)
refs ENG-607
- added the option to rename the free tier
- added the option to render monthly or yearly pricing by default on
signup
- added a "% discount" summary on the yearly pricing tab
2024-02-20 14:07:17 +01:00
Sag
e9f5af110c
🎨 Added option to change the name of the free tier (#19715)
ref ENG-607

- also added the option to show the monthly pricing by default during
signup

Co-authored-by: Simon Backx <simon@ghost.org>
Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
2024-02-20 12:54:41 +01:00
Ryan Feigenbaum
f8bcb489e0
Released Portal 2.37.3 (#19695)
No issue
2024-02-14 12:14:07 -05:00
Ryan Feigenbaum
4d6aaf0f68
Update grammar and fix missing word in Email receiving FAQ (#19637)
There were two changes in the Email receiving FAQ page.

1. Add "a" to "If you're not receiving the email newsletter you've
subscribed to, here are a few things to check."
2. Remove unnecessary hyphens from "to-and-from this address."

@jonhickman
2024-01-31 16:16:40 -05:00
Sag
b5c6cf7d2d
Released Portal 2.37.2 (#19595)
no issue
2024-01-27 01:08:23 +00:00
Sag
1e988cccff
Revert Portal changes (#19594)
no issue

- This revert recent changes made to Portal, that may be causing the
Free tier to not render properly on Ghost sites
2024-01-27 01:46:59 +01:00
Djordje Vlaisavljevic
9a3aa6310b Updated portal price toggle design
refs DES-24 DES-25
2024-01-25 12:08:33 +00:00
Ronald Langeveld
0f24f1efef
Bumped portal to 2.37.1 (#19554)
no issue
2024-01-23 13:19:05 +00:00
Ronald Langeveld
52e99f904e
Added Portal Frame conditions (#19549)
no issue

- adds 2 addition conditions for when the Portal iframe should be
visible.
- waits an extra 100ms before making it visible to give portal time to
properly load.

---------

Co-authored-by: Princi Vershwal <vershwal.princi@gmail.com>
2024-01-23 12:31:08 +00:00
Djordje Vlaisavljevic
d37a46a400
Updated yearly discount indicator copy PROD-299 (#19540)
refs PROD-299
2024-01-22 14:53:57 +00:00
renovate[bot]
3575102462 Update dependency vite to v4.5.2 [SECURITY] 2024-01-22 09:25:09 +01:00
Sodbileg Gansukh
ea04f74a82
Fixed dashed border width issue for offers preview in Portal (#19427)
fixes PROD-282
2024-01-03 06:48:47 +00:00
Daniel Lockyer
fc02ca8bbb Reverted "Update Vite packages"
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1702454781859679

- this reverts commit cf60db85d8 as we've
  seen issues with the `vite-plugin-css-injected-by-js` dependency
2023-12-13 09:24:29 +01:00
Sodbileg Gansukh
b7648e7bc2
Added design improvements to the Portal preview in offers (#19349)
fixes PROD-251, PROD-252, PROD-254
2023-12-13 06:17:12 +00:00
renovate[bot]
cf60db85d8 Update Vite packages 2023-12-12 18:23:37 +01:00
Djordje Vlaisavljevic
5c19249473
Added yearly discount indicator to monthly/yearly toggle PROD-60 PROD-222 PROD 223 (#19276)
refs PROD-60, PROD-222, PROD-223, PROD-89, PROD-94

- Indicator shows up in the monthly/yearly toggle if there are any paid
tiers with yearly discount, and shows the highest discount in order to
nudge visitors towards checking out yearly plan
- A couple of smaller portal improvements: typos, spacing, alignment

---------

Co-authored-by: Simon Backx <simon@ghost.org>
2023-12-12 09:32:56 +00:00
Sanne de Vries
61a91f7dbd
Flipped thumbs-down icon horizontally in email and Portal (#19306)
Refs https://github.com/TryGhost/static/pull/3
- This way the thumbs-down is facing the opposite direction as the
thumbs-up
2023-12-11 13:05:11 +00:00
renovate[bot]
9fae565673 Update sentry-javascript monorepo to v7.86.0 2023-12-11 09:48:49 +01:00
Sag
1fb22c8aca
Removed hardcoded title for single free tier in Portal (#19289)
fixes PROD-68
2023-12-07 19:28:14 +00:00
Simon Backx
3f6ea04c43
Added portal default plan setting (#19238)
fixes PROD-61

This adds a new default plan setting. It defaults to yearly, which is
the current default selected interval in Portal.

Behind the new portal improvements feature flag, the default plan can be
changed. It will also change automatically if the available intervals
are changed.

This PR also wires up passing the new setting to the Portal preview.
2023-12-06 11:39:58 +01:00
Simon Backx
2830a0fba0 Released Portal v2.37.0 2023-12-06 11:30:47 +01:00
Sag
545cf8c258
Updated logic to allow a different name for the free tier (#19229)
fixes PROD-69
2023-12-05 18:05:16 +00:00
Sag
40c486702c
Released Portal v2.36.5 (#19236)
no issue

- this version contains a bug fix for links in signup terms. See commit
fd1a08641e
2023-12-05 13:55:22 +00:00
Sag
fd1a08641e
🐛 Fixed links in signup terms (#19235)
fixes https://github.com/TryGhost/Product/issues/4222
fixes PROD-197

- links in signup terms were not opening properly, as we open Portal
within an iframe
- the previous fix in place did not work anymore, as the HTML structure
of the signup terms has changed
2023-12-05 10:47:27 -03:00
renovate[bot]
e2a6a83fb6 Update sentry-javascript monorepo to v7.85.0 2023-12-04 22:05:42 +01:00
renovate[bot]
a1c292b683 Update dependency @vitejs/plugin-react to v4.2.1 2023-12-04 19:41:11 +01:00
renovate[bot]
3267eb9843 Update dependency vite to v4.5.1 2023-12-04 12:56:21 +01:00
renovate[bot]
de2482736e Update sentry-javascript monorepo to v7.84.0 2023-12-01 08:58:32 +01:00
Ronald Langeveld
802bb9bc8d
Bumped Portal to 2.36.4 (#19207)
refs https://linear.app/tryghost/issue/ADM-20/
2023-11-30 13:44:18 +00:00
Ronald Langeveld
b9c6a57d1b
Fixed Portal's Ship command (#19205)
refs https://ghost.slack.com/archives/C02G9E68C/p1701344186524289

- changed the ship command in portal to avoid checking the status of
files in all of Ghost and just checks for the status of files inside
Portal before publishing to NPM.

---------

Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
2023-11-30 15:16:56 +02:00
Sodbileg Gansukh
9914eb753b
Offers modal and preview improvements (#19192)
fixes ADM-20

- increased the width of the modals
- smaller width for the portal preview for better balance
2023-11-30 05:43:37 +00:00
Sag
f8ad5fb2ea
Updated Portal to use calculated support and default email addresses (#19163)
fixes GRO-72

- added "default_email_address" and "support_email_address" to the
public settings
- when available, use these addresses in Portal. Otherwise, fallback to
current logic
2023-11-29 09:48:05 -03:00
renovate[bot]
d5f3b26e87 Update sentry-javascript monorepo to v7.83.0 2023-11-29 12:29:34 +01:00
Simon Backx
5d8d8cee0a Released @tryghost/portal@2.36.3 2023-11-28 16:18:01 +01:00
Simon Backx
57d43d2d72 🐛 Fixed Portal default page handling
fixes GRO-88

Instead of going to the previous page when visiting /#/portal, it will now go to the default page:
- Sign up if you are not signed in
- Account home if you are signed in

Previously, it had the same behaviour, with the difference that it would also go to the previous page if there was any.
2023-11-28 16:18:01 +01:00
renovate[bot]
56d18edf0e Update sentry-javascript monorepo to v7.81.1 2023-11-21 15:05:41 +01:00
renovate[bot]
7a3ae4ab75 Update sentry-javascript monorepo to v7.81.0 2023-11-20 16:57:32 +01:00
renovate[bot]
fa51b1b3dd Update dependency @vitejs/plugin-react to v4.2.0 2023-11-20 09:42:07 +01:00
Simon Backx
75bb53f065
🔒 Added support for logging out members on all devices (#18935)
fixes https://github.com/TryGhost/Product/issues/3738
https://www.notion.so/ghost/Member-Session-Invalidation-13254316f2244c34bcbc65c101eb5cc4

- Adds the transient_id column to the members table. This defaults to
email, to keep it backwards compatible (not logging out all existing
sessions)
- Instead of using the email in the cookies, we now use the transient_id
- Updating the transient_id means invalidating all sessions of a member
- Adds an endpoint to the admin api to log out a member from all devices
- Added the `all` body property to the DELETE session endpoint in the
members API. Setting it to true will sign a member out from all devices.
- Adds a UI button in Admin to sign a member out from all devices
- Portal 'sign out of all devices' will not be added for now

Related changes (added because these areas were affected by the code
changes):
- Adds a serializer to member events / activity feed endpoints - all
member fields were returned here, so the transient_id would also be
returned - which is not needed and bloats the API response size
(`transient_id` is not a secret because the cookies are signed)
- Removed `loadMemberSession` from public settings browse (not used
anymore + bad pattern)

Performance tests on site with 50.000 members (on Macbook M1 Pro):
- Migrate: 6s (adding column 4s, setting to email is 1s, dropping
nullable: 1s)
- Rollback: 2s
2023-11-15 17:10:28 +01:00
renovate[bot]
4651ef3d9b Update sentry-javascript monorepo to v7.80.1 2023-11-15 12:31:56 +01:00
Daniel Lockyer
ee804fc7af Hidden "info" Vite output unless in CI
refs https://github.com/TryGhost/DevOps/issues/104

- `info` is very verbose as it prints all files and their sizes
- we often don't care about this, so we can do away with `info` in favor
  of `warn`
2023-11-15 10:11:22 +01:00
renovate[bot]
ab4a21db49 Update babel monorepo to v7.23.3 2023-11-15 09:23:45 +01:00
Daniel Lockyer
53157f3c40 Disabled reporting compressed gzip size
refs https://vitejs.dev/config/build-options.html#build-reportcompressedsize

- this should make building a little bit quicker because it doesn't have
  to calculate the gzip size (I don't think we're likely to hit this
  because we don't have large projects, but it's still nice to clean up
  the output)
2023-11-15 09:11:12 +01:00
Simon Backx
395c109c67 🐛 Fixed UI glitch on unsubscribe page in Portal
refs https://ghost.slack.com/archives/C02G9E68C/p1699391515110759

When the unsubscribe page first showed, member is set to `undefined`. This cause the normal NewsletterManagement page to be visible, but with the wrong settings. This caused the switches to quickly change between on/off state, making it look like some setting was changed when it was not.

To fix this, I added a loading page to the unsubscribe page.

Apart from this, the current error page now will get shown correctly when the uuid in the url is invalid. And the toast message on the top will be hidden if the newsletter uuid in the url is missing or invalid.
2023-11-08 15:05:47 +01:00
renovate[bot]
85979df33d Update sentry-javascript monorepo to v7.78.0 2023-11-08 14:06:32 +01:00
Djordje Vlaisavljevic
7e01bdbf18 Removed unnecessary spacing
refs https://github.com/TryGhost/Product/issues/4106
2023-11-07 11:39:32 +00:00
renovate[bot]
8d324a6257 Update dependency @vitejs/plugin-react to v4.1.1 2023-11-02 09:51:00 +01:00
renovate[bot]
62ecb1ebd8 Update sentry-javascript monorepo to v7.77.0 2023-11-01 09:14:38 +01:00
renovate[bot]
5844e5c9f1 Update dependency vite to v4.5.0 2023-10-24 09:13:06 +02:00
renovate[bot]
f18287eb9b Update dependency concurrently to v8.2.2 2023-10-22 12:25:35 +02:00
Michael Barrett
094ea1d2b0
🐛 Fixed plan upgrade not cancelling trial (#18699)
closes https://github.com/TryGhost/Product/issues/4036

Fixed a bug where a member on a trial plan would not have their trial
cancelled when they upgraded to a paid plan
2023-10-20 08:52:08 +01:00
Sag
4911a73979
Released Portal v2.36.2 (#18654)
no issue
- this version contains minor improvements and bug fixes for the Recommendations feature
2023-10-16 17:27:37 +00:00
renovate[bot]
64fd510711 Update babel monorepo 2023-10-13 08:12:20 +02:00
Simon Backx
9abd466397
Renamed reason to description in recommendations table (#18527)
fixes https://github.com/TryGhost/Product/issues/4005

We no longer use the 'reason' of a recommendation, but allow a flexible
description instead. Because this is a breaking change in the API, we do
this before making this feature GA.
- Added new database utils for renaming a column
- Added new migration to rename the column
- Updated all references in code
2023-10-09 11:19:44 -03:00
Daniel Lockyer
07e603a5cd Reverted "Update sentry-javascript monorepo to v7.73.0"
- this reverts commit ec5e2cef20
2023-10-06 13:46:17 +02:00
renovate[bot]
ec5e2cef20 Update sentry-javascript monorepo to v7.73.0 2023-10-06 11:12:32 +02:00
renovate[bot]
b2cebdc9b0 Update dependency vite to v4.4.11 2023-10-06 07:55:29 +02:00
Simon Backx
7b3a0c6863
🐛 Fixed outboundLinkTagging setting affected whether member sources are tracked (#18498)
no issue

- During the one click subscribe flow, the outboundLinkTagging should
affect whether we send a history or not to the signup endpoint. But for
internal history this is the members_track_sources setting. This happens
in the backend normally.
- Do not send a (constructed) history to external sites (= one click
subscribe flow in recommendations) if outboundLinkTagging is false
- Do always send a history internally for local signups (backend handles
whether to store it based on the members_track_sources setting that is
currently not exposed in the frontend). The history is not built if this
setting is disabled, but we could have an old history entry if this
setting was enabled in the past.
2023-10-05 12:25:21 +02:00
Simon Backx
1882b7048d
Added click tracking for recommendations helper (#18496)
fixes https://github.com/TryGhost/Product/issues/4001
2023-10-05 11:37:02 +02:00
renovate[bot]
6ec3a600cc Update dependency vite to v4.4.10 2023-10-04 08:35:18 +02:00
Michael Barrett
d406d2ba6a
🐛 Fixed incorrect subscription status text when subscription is comped (#18369)
refs https://github.com/TryGhost/Product/issues/3963

The subscription status text was incorrect when a subscription was
comped and a member had multiple subscriptions (i.e a cancelled sub and
a comped sub). This was because the methods used to determine the status
of a subscription only took into account the status of the first
subscription associated with a member.
2023-09-27 08:46:55 +01:00
renovate[bot]
d9ec7a0b90 Update dependency @vitejs/plugin-react to v4.1.0 2023-09-27 09:36:39 +02:00
Sag
b304a88a63
Hooked 'Maybe Later' button in the Recommendations modal (#18337)
closes https://github.com/TryGhost/Product/issues/3824
2023-09-25 15:25:28 +00:00
Djordje Vlaisavljevic
21bdd38b37 Added "Maybe later" button to recommendations modal
refs https://github.com/TryGhost/Product/issues/3824
2023-09-25 15:29:38 +01:00
Djordje Vlaisavljevic
99e455a4f5 Fixed recommendations modal heading issue
no ref
2023-09-22 14:42:16 +01:00
Sag
65c4553467
Published Portal 2.36.1 (#18275)
no issue
2023-09-21 15:44:49 +00:00
Djordje Vlaisavljevic
006d902116 Updated recommendations portal modal design
refs https://github.com/TryGhost/Product/issues/3898
2023-09-21 16:16:01 +01:00
renovate[bot]
6e960bf477 Update sentry-javascript monorepo to v7.70.0 2023-09-21 11:51:47 +02:00
Djordje Vlaisavljevic
7439e68628 Updated recommendations design
refs https://github.com/TryGhost/Product/issues/3898
2023-09-20 14:46:26 +01:00
renovate[bot]
c055179765 Update dependency vite-plugin-svgr to v3.3.0 2023-09-20 08:41:57 +02:00
Djordje Vlaisavljevic
85484c20af Updated recommendation list design in portal
refs https://github.com/TryGhost/Product/issues/3898
2023-09-19 15:39:33 +01:00
Simon Backx
d26c0c7995 Released Portal v2.36.0 2023-09-15 16:47:12 +02:00
Simon Backx
ff61b33049 Grouped recommendations in Portal
fixes https://github.com/TryGhost/Product/issues/3893
2023-09-15 16:23:36 +02:00
Simon Backx
9a4c0ba33b Fixed counting subscribe after click on RecommendationsPage
fixes https://github.com/TryGhost/Product/issues/3892

After a user visited a site, we should still a subscribe that happens later.
2023-09-15 16:23:36 +02:00
renovate[bot]
9730229968 Update sentry-javascript monorepo to v7.69.0 2023-09-15 10:33:55 +02:00
Michael Barrett
32eb4635cf
Updated data-members-newsletter to use the name of the newsletter (#18072)
refs https://github.com/TryGhost/Product/issues/3860

`data-members-newsletter` implementation was updated to use the `name`
of the newsletter instead of it's `id`
2023-09-14 16:02:09 +01:00
Simon Backx
e3347827ca Added sending of events when clicking or subscribing to a recommendation
fixes https://github.com/TryGhost/Product/issues/3855
2023-09-14 14:47:02 +02:00
Djordje Vlaisavljevic
b5ab3af8a6
Removed success toast on 1-click subscribe (#18119)
refs https://github.com/TryGhost/Product/issues/3880
2023-09-13 15:25:17 +00:00
Djordje Vlaisavljevic
e9af2c86c1 Added inline success message after 1-click subscribe
refs https://github.com/TryGhost/Product/issues/3880
2023-09-13 14:50:55 +01:00
Djordje Vlaisavljevic
75311cc534 Updated design to handle one-click subscriptions better
refs https://github.com/TryGhost/Product/issues/3856
2023-09-12 12:37:28 +01:00
Simon Backx
d166977ae4
Updated Portal to always honor outboundLinkTagging setting (#18079)
no issue

- Do not set ?ref in recommendations if analytics is disabled
- Do not send url_history if analytics is disabled
- Expose outboundLinkTagging as a public setting
2023-09-12 10:27:04 +00:00
Simon Backx
562123f06a
Added attribution to recommendation clicks (#18077)
fixes https://github.com/TryGhost/Product/issues/3865
2023-09-12 09:21:37 +00:00
Simon Backx
6475895f9e
Added loading indicator to one click signup (#18075)
no issue
2023-09-12 09:04:43 +00:00
Simon Backx
c863ed2188
Fixed white page during one click subscribe flow (#18074)
no issue

In Chrome, opening a new tab immediately focusses it, even when trying
to blur or focus the main window.
2023-09-12 08:36:50 +00:00
Simon Backx
f130fb2e85
Implemented one-click-subscribe for recommendations (#18067)
fixes https://github.com/TryGhost/Product/issues/3856
2023-09-11 17:06:15 +02:00
Michael Barrett
7f9ba46ab6
Fixed data-members-newsletter when used with checkboxes (#18041)
no refs

When `data-members-newsletter` was used with checkboxes, if no
checkboxes were selected then the backend would subscribe the member to
the default newsletters which is not what we want - We want to subscribe
the members only to the newsletters they have selected
2023-09-08 14:12:16 +00:00
Michael Barrett
b472ffb39b
Fixed invalid selector for data-members-newsletter attribute (#18039)
no refs

Fixed invalid selector for `data-members-newsletter` attribute
2023-09-08 13:21:56 +00:00
Princi Vershwal
963d4002cd
Added support for selectable newsletters in custom sign up-forms (#18030)
refs https://github.com/TryGhost/Product/issues/3836
2023-09-08 18:30:07 +05:30
Simon Backx
c08538ba84
Released Portal v2.35.2 (#18031) 2023-09-08 11:07:20 +00:00
Simon Backx
669be72673
Wired up pagination to recommendations (#18018)
fixes https://github.com/TryGhost/Product/issues/3822
fixes https://github.com/TryGhost/Product/issues/3838

This PR became a bit big because it affected multiple parts of Ghost
that needed to be updated to prevent breaking anything.

### Backend
- Added pagination to the recommendations API's
- Updated BookshelfRepository template implementation to handle
pagination
- Allow to pass `page` and `limit` options to Models `findAll`, to allow
fetching a page without also fetching the count/metadata (=> in the
repository pattern we prefer to fetch the count explicitly if we need
pagination metadata)
- Added E2E tests for public recommendations API (content API)
- Extended E2E tests of admin recommendations API

### Portal
- Corrected recommendations always loaded in Portal. Instead they are
now only fetched when the recommendations page is opened.

### Admin-X
- Added `usePagination` hook: internally used in the new
`usePaginatedQuery` hook. This automatically adds working pagination to
a query that can be used to display in a table by passing the
`pagination` and `isLoading` results to the `<Table>`
- Added placeholder `<LoadingIndicator>` component
- Added a loading indicator to `<Table>`. This remembers the previous
height of the table, to avoid layout jumps when going to the next page.
2023-09-08 12:32:06 +02:00
Princi Vershwal
83282ca4cd
Added checks for subscription to multiple newsletter through custom sign up form (#17994)
refs https://github.com/TryGhost/Product/issues/3810

---------

Co-authored-by: Michael Barrett <mike@ghost.org>
2023-09-07 18:27:32 +01:00
Michael Barrett
b70fd30a39
Add ability to specify newsletter in a custom sign-up form (#17956)
refs https://github.com/TryGhost/Product/issues/3809

When an input is added to a custom sign-up form with the attribute
`data-members-newsletter`, the value of the input will be used as the
newsletter to subscribe the member to.
2023-09-07 16:31:14 +01:00
Simon Backx
6e7089e58a
Fixed loading of invalid recommendation icons and feature images (#18011)
fixes https://github.com/TryGhost/Product/issues/3811 
fixes https://github.com/TryGhost/Product/issues/3829
2023-09-07 12:30:59 +02:00
Simon Backx
8f618c7b5c Updated Portal tests 2023-09-07 10:29:43 +02:00
Simon Backx
afeb9579b5 Released Portal v2.35.1 2023-09-07 10:29:43 +02:00
Simon Backx
d1c6bfefbc Fixed direct subscribe links broken
refs https://github.com/TryGhost/Product/issues/3770

- Site is not always defined, so the things broke when using the signup action without a defined site, where it wants to read the recommendations_enabled setting
- Fixed this by removing the welcome page and looking for the existing query params instead
2023-09-07 10:29:43 +02:00
Simon Backx
2497a665b2 Released Portal v2.35.0 2023-09-06 17:33:42 +02:00
Simon Backx
f71c074d31
Added one-click-subscribe detection (#17995)
fixes https://github.com/TryGhost/Product/issues/3820

- This adds a new public site endpoint in the members API to check if a
site can offer the one-click-subscribe feature
- This is implemented on the members API as a copy of the `site`
endpoint because the admin API site endpoint is protected by CORS and
mainly because it can be served on a different domain than the
recommended site and this is hard to detect reliably from the frontend
- Added a new calculated setting `allow_self_signup`, which can replace
the setting that is currently used in Portal (best to do this after a
release otherwise we risk creating issues if a patch release happens)
2023-09-06 15:11:14 +00:00