Commit Graph

150 Commits

Author SHA1 Message Date
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