0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00
Commit graph

300 commits

Author SHA1 Message Date
Sam Lord
2740686d53
Refactored Captcha to simplify usage
ref BAE-397

Moved the hCaptcha component outside of the page level, since it was
complicating the logic within the pages with no good reason.

The hCaptcha component is now attached to the pop-up modal. Since it's
invisible, this doesn't impact layout anyway, but means that any action
can trigger Captcha to run, and use the result within that same action.

This simplifies the flow by having the action itself confirm that
Captcha is enabled, then grabbing the token by running either a
challenge (for self-hosters) or using their enterprise heuristics system
(for Ghost Pro).

This also fixes issues where sites with multiple tiers wouldn't work
with Captcha, since the page had changed and the hCaptcha component was
unloaded.
2025-02-17 08:17:58 +00:00
renovate[bot]
8f28205042
Update dependency @hcaptcha/react-hcaptcha to v1.11.2 (#22161)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@hcaptcha/react-hcaptcha](https://redirect.github.com/hCaptcha/react-hcaptcha)
| [`1.11.1` ->
`1.11.2`](https://renovatebot.com/diffs/npm/@hcaptcha%2freact-hcaptcha/1.11.1/1.11.2)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@hcaptcha%2freact-hcaptcha/1.11.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@hcaptcha%2freact-hcaptcha/1.11.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@hcaptcha%2freact-hcaptcha/1.11.1/1.11.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@hcaptcha%2freact-hcaptcha/1.11.1/1.11.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>hCaptcha/react-hcaptcha
(@&#8203;hcaptcha/react-hcaptcha)</summary>

###
[`v1.11.2`](https://redirect.github.com/hCaptcha/react-hcaptcha/releases/tag/1.11.2)

[Compare
Source](https://redirect.github.com/hCaptcha/react-hcaptcha/compare/1.11.1...1.11.2)

#### What's Changed

- fix: Fix one captcha per container issue by
[@&#8203;zoryana94](https://redirect.github.com/zoryana94) in
[https://github.com/hCaptcha/react-hcaptcha/pull/251](https://redirect.github.com/hCaptcha/react-hcaptcha/pull/251)
- chore: Update Sentry docs by
[@&#8203;zoryana94](https://redirect.github.com/zoryana94) in
[https://github.com/hCaptcha/react-hcaptcha/pull/249](https://redirect.github.com/hCaptcha/react-hcaptcha/pull/249)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "* * * * 1-5" (UTC), Automerge - At
any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/TryGhost/Ghost).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNjQuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE2NC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-11 12:24:40 +00:00
Fabien O'Carroll
c7b631b41f Released @tryghost/portal v2.49.2
Changelog for v2.49.1 -> 2.49.2:
  - Updated i18n translations
2025-02-10 07:46:26 +00:00
Fabien O'Carroll
1bdc11eee3 Added new release script for Portal
This will be used for search and comments too, but I want to start with just
one app to get things going. Key things the script does:

 - Enforces that we're not on main & have clean working dir
 - Creates a well structured commit message w/ basic changelog
 - Updates the package.json and default config

The script explicitly does not push anything to GitHub or to NPM, giving us
more control about the contents of the commit
2025-02-10 07:38:57 +00:00
Fabien O'Carroll
a437574f44 Released Portal v2.49.1
changelog v2.49.0 -> v2.49.1:
  - https://github.com/TryGhost/Ghost/commit/d1f5ad764652a2b6676
  - i18n updates
2025-02-06 07:33:27 +00:00
Sam Lord
d1f5ad7646
Portal: Fixed issue where signup was not always called with hCaptcha
ref BAE-375

Discovered a way to test hCaptcha using a mock -- so implemented that to
ensure hCaptcha is always called.
2025-02-03 14:48:23 +00:00
Sag
f4659a67ac
Released Portal v2.49.0 (#22061)
no issue

- changelog v2.48.3 -> v2.49.0:
    - c0ccdbe280
    - 2f63fa2302
    - c586b1c034
2025-01-28 07:27:07 +00:00
Sag
c586b1c034
Enabled publishers to block additional email domains in member signups (#22047)
ref https://linear.app/ghost/issue/ENG-1973
ref https://app.incident.io/ghost/incidents/132

- following an increase in spam members signups, we have recently added
a blocklist of email domains, based on config (see
https://github.com/TryGhost/Ghost/pull/22027). With this change, we are
extending that feature with a user-facing setting in Ghost Admin
- publishers can now block additional email domains in member signups,
directly from Ghost Admin. These emails domains will be added to the
list of domains already blocked by config
2025-01-28 13:46:37 +07:00
Sam Lord
2f63fa2302
Added Captcha to data attribute forms
ref BAE-370

Enables Captcha (when labs flag and config entry set) in data-attribute
forms within Portal.
2025-01-27 16:52:52 +00:00
Sam Lord
c0ccdbe280
Portal: Added HCaptcha element to signup/signin pages
ref BAE-371

Added the HCaptcha react component & related utils to enable it /
disable it based on the Captcha labs flag. At the moment this does not
include the same functionality on forms using the data-attributes.
2025-01-23 12:02:53 +00:00
Sag
5409ae1c68
Released Portal v2.48.3 (#22044)
no issue
- changelog v2.48.2 -> v2.48.3:
    - f07291b72c
2025-01-22 07:35:54 +00:00
Sag
f07291b72c
Added missing error message handler for the integrity token endpoint (#22043)
ref https://linear.app/ghost/issue/PRO-1349

- the integrity token endpoint can return a json response with an error
message (for example, when rate limited)
- added the standard response handler to the integrity token endpoint in
Portal, to render the error message sent by the backend
2025-01-22 14:26:49 +07:00
Sag
c8e76fb498
Released Portal v2.48.2 (#22041)
no issue

- changelog v2.48.1 -> v2.48.2:
    - 3ca419bcbc
2025-01-22 04:48:58 +00:00
Sag
3ca419bcbc
Improved error message when email provider is blocked (#22040)
ref https://linear.app/ghost/issue/ONC-721
ref https://linear.app/ghost/issue/PRO-1349

- also added the rate limit error message into the translate-able
strings in Portal
2025-01-22 04:40:22 +00:00
Chris Raible
669da1cfb1
Shipped portal@2.48.1 (#22039)
Patch update including this bug fix:
713e75838a
2025-01-21 13:04:23 -08:00
Chris Raible
713e75838a
🐛 Fixed newsletters not rendering in Portal Email Preferences (#22037)
ref
https://linear.app/ghost/issue/ONC-723/support-escalation-re-fwd-email-preferences

- On sites where the Default recipients setting was set to anything
other than "Whoever has access to the post", the list of newsletters and
the toggle to subscribe/unsubscribe would not be rendered on the Portal
"Email Preferences" page.
- The bug was introduced in v5.106.0, and intended to hide the
newsletter list if Newsletter sending were disabled completely, but
there was bug in the logic
- This commit has a breaking test to prevent this in the future, and
fixes the logic to only hide the newsletter list if
`editor_default_email_recipients` is explicitly set to 'disabled'.
2025-01-21 11:22:45 -08:00
Sag
970741cf5d
🔒 Blocked spammy email domains in member signups (#22027)
ref https://linear.app/ghost/issue/ONC-721
ref https://app.incident.io/ghost/incidents/132

- added a blocklist at the email domain level for free member signups
- for example, if `blocked-domain.com` is blocked,
`thomas@blocked-domain.com` cannot sign up as free member
- the blocklist is configurable: `"spam.blocked_email_domains":
["blocked-domain.com"]`
2025-01-20 22:12:55 +07:00
Sam Lord
5b42cf2338
Portal: Refactored data-attributes file to use async / await
no issue

Will assist with later changes, like adding Captcha. Since Captcha is an
optional feature, it would complicate the promise chain considerably.
2025-01-09 17:41:37 +00:00
Sanne de Vries
ea127b29db
Shipped portal@2.48.0 (#21988)
No issue
- Includes changes to Portal Button default settings and mobile
behaviour
2025-01-09 16:12:12 +01:00
Sanne de Vries
2668284451
Changed Portal Button to be off by default and hidden on mobile (#21983)
Ref
https://linear.app/ghost/issue/DES-1074/change-portal-button-defaults-and-hide-on-mobile
- These days, themes have subscribe and account buttons built in. The
Portal Button should be opt-in rather than opt-out.
- On mobile devices, the Portal Button takes up too much valuable real
estate.
2025-01-09 13:07:30 +01:00
Sag
0c045d0515
Released Portal v2.47.1 (#21967)
no issue

- changelog:
    - 943c393542
    - 1fd2175a44
2025-01-07 09:06:41 +00:00
Sag
1fd2175a44
Fixed copy in Portal when signup is not available (#21965)
ref https://linear.app/ghost/issue/ENG-1235

- we currently have three different messages when signup is not
available (this site is invite-only, this site only accepts paid
memebers, membership unavailable); the first two offer a link to sign
in, whereas the third one does not as all membership features are
disabled
- this PR fixes the logic to render the correct message, given the
reason why signup is not available
- also removes the usage of `allowSelfSignup` in Portal, as 1) the
naming is poor and 2) `allowSelfSignup` is computed based on the
existing `membersSignupAccess` and is therefore redundant
2025-01-07 08:32:32 +00:00
John O'Nolan
943c393542
2025
Co-authored-by: Hannah Wolfe github.erisds@gmail.com
2025-01-06 11:40:59 +00:00
Sag
cff841d1c7
Released Portal v2.47.0 (#21934)
no issue

Changelog v2.46.2 -> v2.47.0:
- 55dc9d997f
- 3233bae37c
- 4bc85e2ff2
- 4ec0bdde3c
- 58ac19ada6
- e67e2411f2
2024-12-20 03:31:10 +08:00
Sag
e67e2411f2
Added option to disable free signups (#21862)
ref https://linear.app/ghost/issue/ENG-1235

- problem: today, when a publisher removes the "free" tier from the
Portal settings, it doesn't disable free signups entirely. It removes
the free tier from the Portal UI, but free signup is still possible via
other avenues (signup form in themes, embeddable signup form on another
site, direct API call). This creates confusion/frustration for
publishers who thought they disabled free signups, but are still getting
unwanted free signups (spam). There is no way to disable free signups
entirely.

- solution: introduced a new "paid-members only" subscription access
setting, which blocks all free signups at the API level. If chosen, the
free tier is hidden in Portal and all free signup are blocked at the API
level with a readable error message (`This site only accepts paid
members.`)

![CleanShot 2024-12-10 at 09 09
28@2x](https://github.com/user-attachments/assets/c71b38b4-0d23-429c-a743-00772e82c787)
2024-12-20 02:43:48 +08:00
Peter Zimon
58ac19ada6
Updated Portal notification styles (#20538)
closes https://linear.app/ghost/issue/DES-548/update-portal-notification-style

Portal popup notification styles look outdated and harsh. Also in-popup notifications have several visual design issues such as positioning, alignment, typography and so on. This PR fixes these issues by applying a much more standard design to Portal notifications.
2024-12-17 13:37:00 +01:00
Sodbileg Gansukh
4ec0bdde3c
Made name field optional in Portal account settings (#21900)
ref DES-898

- previously, the name field in Portal account settings used to be required which caused an issue users were not able to update their email address without adding name first
- now the name field is optional makes it possible to update the email address without adding name, or remove their name as well
- it was intended not to wire this up to "Display name in signup form" setting in Portal for the simplicity
2024-12-17 18:15:16 +08:00
Sodbileg Gansukh
4bc85e2ff2
Fixed layout shift issue when Portal popup appears (#21895)
ref DES-547

- when Portal popup is opened and the browser scroll bar is visible, it
used to make layout shift, because we were hiding the scrollbar
- now it applies right margin to body element and the trigger button by
calculating the scrollbar width only when the browser scroll bar is
visible
- it also preservers the current right margin for those elements and
makes the calculation based on that
2024-12-17 14:16:39 +08:00
Ronald Langeveld
3233bae37c
🐛 Fixed archived newsletters visible in Portal when email disabled (#21737)
ref ONC-225

- Ensures newsletter preferences are hidden in the Portal when email functionality is disabled.
- Adds conditional logic in NewsletterManagement.js to check for the hasNewslettersEnabled prop.
- Updates tests in AccountEmailPage.test.js and AccountHomePage.test.js to cover scenarios where newsletters are disabled.
- Improves user experience by preventing the display of irrelevant settings when email is turned off.
2024-12-16 13:14:21 +07:00
Ronald Langeveld
55dc9d997f
Added loading state when ordering comments (#21788)
PLG-280

- Added a loading state implementation when changing the ordering of
comments.
- This improves the overall UX particularly with slower connections.
- Due to the nature of how comments and ordering are handled, we
approached it with a simple state that determines whether it's done
loading or not around the API query.

---------

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
2024-12-04 10:16:58 +08:00
Steve Larson
79fb7ee787
Bumped Portal (#21704)
ref https://linear.app/ghost/issue/ONC-613
2024-12-03 08:41:12 -06:00
Daniël van der Winden
30a0018c15
🐛 Fixed unclear newsletter (un)subscribe modal (#21739)
fixes
https://linear.app/ghost/issue/DES-953/newsletter-unsubscribe-modal-is-unclear-leading-to-repeated

Previously, when clicking 'Unsubscribe' in an email, landing on this
modal it was unclear what had just happened if you didn't read the text
below the title, causing people to click the toggles repeatedly.

We've now added a toast notification to make it clear what has just happened,
and if you click the toggles, the notification also shows.

Ideally, we'd be able to stack these notifications in case you hit
multiple toggles in quick succession, but that's going to be a separate
issue, as—to achieve that—it needs to be rewritten more significantly.

---------

Co-authored-by: Sodbileg Gansukh <sodbileg.gansukh@gmail.com>
2024-11-28 10:42:43 +01:00
Steve Larson
673e316580
🐛 Fixed unsubscribe all link in Portal sometimes failing (#21703)
ref https://linear.app/ghost/issue/ONC-613/

A little while back we changed to requiring a key when interacting with
member endpoints that are not authenticated. One request code path in
Portal was missed, causing some requests to fail. This should patch that
hole.
2024-11-24 01:10:25 +00:00
Steve Larson
f1cb2b8d60
Bumped portal and search packages (#21630)
no ref
- includes new translations
2024-11-15 19:10:29 +00:00
Daniël van der Winden
9d0e4e7d45
Updated Signup Page (#21434)
fixes
https://linear.app/ghost/issue/DES-881/sign-up-flow-on-mobile-with-checkbox-on-requires-ux-improvement

On mobile, the Sign Up button is no longer sticky. This ensures
customers scroll down and see the checkbox before they hit the button.

If they do still miss the checkbox, we now have a check in place that
— if the checkbox is the last missing thing — scrolls the checkbox into
view upon submission.

https://github.com/user-attachments/assets/5d7867b6-d60c-4844-9482-af04a0eb1eaf
2024-11-05 10:51:14 +01:00
Sodbileg Gansukh
264e362e06
Fixed sticky unsubscribe from all button on mobile (#21514)
ref DES-785
2024-11-04 11:41:16 +00:00
Cathy Sarisky
8f9a89c1a5
🎨 Updated Portal to accept data-locale (#21420)
no issue

This change adds the ability to pass a desired language/locale into
portal, as a data-locale tag added to the script that loads it.

Falls back to the previous behavior, loading from the site settings, if
no data-locale is present. (And then to 'en', if necessary.) No change
in expected behavior if data-locale is not passed.

This provides an option to run portal in a language other than the
sitewide language.

(ref: https://app.slack.com/client/T025584C4/C018EKC56JF)
2024-11-02 14:19:46 +00:00
Fabien 'egg' O'Carroll
c23cca8739
Bumbed Portal to 2.46.0
This includes the new TRL lang support!
2024-10-25 10:34:24 +00:00
Cathy Sarisky
847bd2a98c
🎨 Supported RTL languages in Portal
Portal will now detect if the language locale is a RTL
language and update it's rendering to accommodate!
2024-10-25 16:19:19 +07:00
Chris Raible
af0f26c75f
Added Dev Container setup (#21279)
no issue

- Dev Containers let you work on Ghost in a consistent, isolated
environment with all the necessary development dependencies
pre-installed. VSCode (or Cursor) can effectively run _inside_ the
container, providing a local quality development environment while
working in a well-defined, isolated environment.
- For now the default setup only works with "Clone repository in
Container Volume" or "Clone PR in Container Volume" — this allows for a
super quick and simple setup. We can also introduce another
configuration to allow opening an existing local checkout in a Dev
Container, but that's not quite ready yet.
- This PR also added the `yarn clean:hard` command which: deletes all
node_modules, cleans the yarn cache, and cleans the NX cache. This will
be necessary for opening a local checkout in a Dev Container.
- To learn more about Dev Containers, read this guide from VSCode:
https://code.visualstudio.com/docs/devcontainers/containers#_personalizing-with-dotfile-repositories

---------

Co-authored-by: Joe Grigg <joe@ghost.org>
Co-authored-by: Steve Larson <9larsons@gmail.com>
2024-10-24 11:15:08 -07:00
Sanne de Vries
4a5c8000bf
Fixed spacing issue with signup terms in Portal (#21390)
REF DES-907
2024-10-24 11:58:00 +00:00
Ronald Langeveld
cd3b1c3935
Bumped Portal to 2.45.1 (#21386)
no issue

Co-authored-by: Sodbileg Gansukh <sodbileg.gansukh@gmail.com>
2024-10-24 04:30:00 +00:00
Sodbileg Gansukh
c11c516e14
Made unsubscribe from all button sticky on scroll (#21381)
ref DES-785
2024-10-23 19:07:29 +08:00
Cathy Sarisky
1ce5dc34ca
🐛 fixed routing error when no recommendations (#21251)
no ref.

The default routing for the portal app is a signup page. When a site has
no recommendations, the result of triggering that page (by following a
link that goes there) is a prompt to sign up, or a notification that one
cannot sign up, if membership is disabled.

This patch adds a "No recommendations" message, which will be shown if a
user follows a recommendations link (#/portal/recommendations) on a site
without recommendations. While we shouldn't end up there very often,
it'll make a lot more sense when it does!
2024-10-22 11:34:44 +01:00
Steve Larson
a01b361e45
Bumped portal (#21345)
no ref
2024-10-20 13:22:46 +00:00
Cathy Sarisky
3a662007cd
🌐 New translations and bug fix on /month and /year (#21267)
No issue

Wrapped a missing /month and /year string. Should work with and without
trials now.

Added a few additional translations for Japanese and French.

Adjusted German - some strings were too long to fit in the layout.
Changed (the German equivalents of) "Start a X day free trial" to
"Select", because the German is just not going to fit on the button.
2024-10-16 09:23:10 +01:00
renovate[bot]
b70bb13fb4 Update sentry-javascript monorepo to v7.119.2 2024-10-15 15:57:58 +02:00
Sag
09b4aceb64
Released Portal v2.44.1 (#21262)
no issue

- this release contains a fix for Tips & Donations for Ghost sites
hosted on subdirectories (commit:
55e415c0c7)
2024-10-09 10:17:02 +00:00
Cathy Sarisky
55e415c0c7
🐛Fixed 404 error for Tips & Donations on subdirectory sites (#21250)
closes #21123 

- There was an error in the calculation of the site's url for sites setup
as subdirectories (yoursite/blog instead of just yoursite/).
- Fixed and tested with a manual build of portal. There's apparently a gap
in test coverage here, as it passed both before and after...
2024-10-08 14:38:53 +02:00
Steve Larson
ddf1744231
Bumped Portal (#21214)
no ref
- bumped to get i18n changes
2024-10-03 21:26:17 +00:00