Commit Graph

266 Commits

Author SHA1 Message Date
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
Cathy Sarisky
1196688b0e
🌐 Improved i18n support for Portal error messages (#21190)
no ref

Expose (some) Portal error strings for translations

💩This is a somewhat hacky (but test-passing and individual inspection
passing) solution to the way Portal handles errors. Or rather, the
half-dozen ways Portal handles errors.

Passing 't' around with context and state, and occasionally recreating
it from the site object. Yes, I am also somewhat horrified, but a better
implementation will need a major rewrite of Portal.

Addresses errors in both the popover React app and in the
data-attributes.

There are probably more. Since Portal exposes raw API responses in some
places, it's hard to enumerate everything that /might/ end up being
client-facing, but at least I've gotten the ones that I've commonly
seen.

Improvements very welcome.
2024-10-03 13:35:23 +00:00
Steve Larson
0f7b1567a3
Reverted "🌐 Updated Portal error handling to be i18n-friendly (#21176)" (#21184)
no ref
- this caused some troubles with error representation and changed
defaulting behavior

Going back to the drawing board on this one. I've been working on a
larger scale refactor so that this could be a hook, which feels much
more appropriate, though a much more substantial change.
2024-10-02 12:06:09 +00:00
Steve Larson
49debef3da
🌐 Updated Portal error handling to be i18n-friendly (#21176)
no ref
- Portal was not set up in a way to allow for easy use of the i18n
module for errors, as they weren't a React component
- moved away from the class model to a functional component that could
utilize React state (AppContext)

I'm working on a different refactor that would convert more of Portal to
hooks & functional components so that the codebase is more consistent
and easier to read. This will have to work for the moment while that is
being done, as that's no small task.
2024-10-01 21:19:09 +00:00
Daniel Lockyer
e2bf950b63 Removed unused @sentry/tracing dependency
- this isn't used anywhere so we can remove it and cleanup a dependency
2024-09-30 11:05:22 +02:00
Sag
4dc4b19b09
Released Portal v2.43.2 (#21082)
ref https://github.com/TryGhost/Ghost/pull/21042
2024-09-24 07:49:23 +00:00
Cathy Sarisky
6b84d9a900
🎨 wrapped missing i18n strings in portal (#21042)
ref https://forum.ghost.org/t/how-to-translate-the-date-intervals-year-and-month-in-portal-js/25599

- Added sneaky missing translation wrapping, notably the elusive year and month strings. Also "Change Plan" and "Choose Plan" for upgrade situations.
- Finding and adding these missing wrappings is critical to making Ghost's i18n usable for customers using other languages
2024-09-19 13:30:45 +01:00
Sag
ab47dc719d
Released Portal v2.43.1 (#21017)
no issue
2024-09-16 20:23:59 +00:00
Peter Zimon
23ffdaf860
Added help pages to Portal links (#20974)
DES-777

- "Not receiving emails" and "Disabled emails" help pages are not
possible to access directly which makes communication to members hard
2024-09-11 13:19:16 +00:00
Kevin Ansfield
73d75413a0
🎨 Convert portal links to relative to avoid homepage flash on click (#20896)
closes https://linear.app/tryghost/issue/PLG-190

- often when adding portal links to your own site pages the URLs are added as absolute on the site's homepage due to copy+paste from displayed URLs in Admin
- when clicking absolute portal URLs the homepage is first loaded before the Portal popup is shown resulting in a slower and flashier experience
- added a transform for all local portal URLs on the page when Portal is initialized so links open the Portal popup immediately on the current page
2024-09-02 11:23:12 +00:00
Ronald Langeveld
b62baa8b0b
Added sentry to support error on Portal (#20890)
ref PLG-204

- Added a sentry capture so we know when and if the support error
component gets triggered.
2024-09-02 16:58:22 +09:00
Kevin Ansfield
0d091992f2 Shipped new Portal version 2024-08-28 17:54:58 +01:00
Sanne de Vries
8ddbf471dd
Updated donation success modal styles (#20859)
REF PLG-152
2024-08-28 15:48:57 +00:00
Kevin Ansfield
c689414497
Added missing translation entries for Portal field placeholders, labels, and errors (#20858)
no issue

- added `t()` around static strings to allow them to be translated
- updated translation files, with context provided in `context.json`
2024-08-28 15:43:03 +00:00
Kevin Ansfield
32edc12cc2 Fixed error closing donation success modal
no issue

- when redirecting from Stripe back to Ghost after making a donation the URL contained a double slash (`//#/portal/...`) which triggered browser security errors when Portal modified the browser history stack when navigating
- the above could prevent the donation success modal from closing
2024-08-28 12:38:14 +01:00
Kevin Ansfield
2b2e5dfeb1 Updated Portal readme with more testing/releasing details 2024-08-28 10:37:04 +01:00
Steve Larson
962194b595
Bumped Portal (#20837)
no ref
2024-08-27 21:29:40 +00:00
Steve Larson
8a1274517d
🐛 Added integrity token to one click subscribe (#20836)
ref https://linear.app/tryghost/issue/ONC-269

When we added the integrity token to all `send-magic-link` callers in
Portal, we missed one.
2024-08-27 21:17:19 +00:00
Kevin Ansfield
709ee163e3 Bumped Portal
ref https://linear.app/tryghost/issue/PLG-152

- updates tips and donations success states
2024-08-27 19:30:27 +01:00
Kevin Ansfield
f613f42bec Updated donation success states
closes https://linear.app/tryghost/issue/PLG-152

- switched member success to a notification
- updated non-member success modal to include signup and signin links
2024-08-27 19:30:27 +01:00
Steve Larson
d24af3bd50
Bumped Portal (#20826)
ref https://github.com/TryGhost/Ghost/issues/20767
2024-08-26 23:06:27 +00:00
Steve Larson
22fcd21fbb
Fixed Portal honeypot field (#20825)
ref INC-97
ref https://github.com/TryGhost/Ghost/issues/20767
- finishes wiring up the honeypot fied
- updates state handing to properly set the value
- maintains honeypot field across page changes within portal

There isn't a single previous commit to point to here since they didn't
get squashed. We added a honeypot field to help mitigate bot signup
activity. It's hidden, and if filled out, we can anticipate it's a bot.
Right now this just logs to Ghost while we collect data.
2024-08-26 22:51:57 +00:00
renovate[bot]
91e8aa1271 Update dependency jsdom to v24.1.3 2024-08-26 09:44:19 +02:00
Sam Lord
0a9d2fadba Added honeypot field to prevent bot signup/signin
ref KTLO-1
Should prevent untargeted attacks using headless browser bots.
2024-08-22 22:32:04 +01:00
Sam Lord
ef4f79370f Added support in Portal for integrity tokens on magic link API
ref KTLO-1
These tokens should prevent untargeted attacks, as the magic link
endpoint needs a token that was generated by the server, similar to a
CSRF token, but without needing any server-side state, or a cookie to
be set for unauthenticated users.
2024-08-22 22:23:16 +01:00
Ronald Langeveld
ad3751bfa6
Added i18n support to tips and donations on portal (#20812)
ref PLG-159

- wrapped strings inside the translate function in Portal
- added new strings to i18n files
2024-08-22 15:28:08 +07:00
Steve Larson
dac2561252
🔒 Added uuid verification to member endpoints not requiring a session
ref https://linear.app/tryghost/issue/ENG-1364
ref https://linear.app/tryghost/issue/ENG-1464

- credits to https://github.com/1337Nerd
- added a hashed value to endpoints that do not require a member sign in in order to verify the source of the link and resulting request
- added redirect to sign in page when trying to access newsletter
management
2024-08-20 16:24:02 +02:00
renovate[bot]
dc7abe4712 Update sentry-javascript monorepo to v7.119.0 2024-08-15 15:11:53 +02:00
Ronald Langeveld
85aed302c1
Bumped Portal to 2.38.0 (#20733)
ref ONC-225

Bumped it a minor since it contains breaking changes.
2024-08-12 14:41:39 +07:00
Ronald Langeveld
da691bf0d7
🐛 Fixed newsletter button not hidden in Portal (#20732)
ref ONC-225

- Wires up the `editor_default_email_recipients` key to the settings
public / content api endpoint.
- This key is then wired up to Portal to determine whether it's hiding or
showing the Member subscribe toggle
2024-08-12 06:00:25 +00:00
Steve Larson
a109b255f0
🐛 Fixed no redirect on Portal signin when trying to access newsletters (#20683)
ref https://linear.app/tryghost/issue/ENG-1464
- added redirect to sign in page when trying to access newsletter
management

If a user tries to access newsletter management when not logged in,
Portal requires sign in via magic link. This magic link didn't previous
redirect the user back to newsletter management, requiring some extra
clicks.
2024-07-29 15:58:08 +00:00
Steve Larson
1f05a7890f
Added test coverage over newsletter flows (#20672)
no ref
- while reviewing the newsletter flows, it was apparent that we were
missing test coverage

Some of the tests in Portal are a bit redundant with tests added for
child components, but it didn't seem worth removing them after getting
them to work. There was a bug in our Portal fixture data that requires a
few changes, as well as some small adjustments for making tests easier
(testing-lib-react has `getByTestId` and simply a `querySelector` to use
alternate test attributes).
2024-07-27 02:20:13 +00:00
renovate[bot]
cbd994d033 Update dependency jsdom to v24.1.1 2024-07-22 09:10:23 +02:00
Michael Barrett
4a59e30050
Published new versions of apps to support BS locale (#20629)
refs
[ONC-150](https://linear.app/tryghost/issue/ONC-150/support-escalation-re-trouble-with-new-languages)

Published new versions of apps to support BS locale
- comments-ui@0.17.3
- signup-form@0.1.5
- portal@2.37.10
2024-07-19 09:26:59 +01:00
Sag
3aca1411fc
Updated Portal readme with updated develop and release instructions (#20576)
no issue
2024-07-10 10:05:41 +00:00