Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(RP): Display subscription ToS/PP when client is Relay #18168

Merged
merged 1 commit into from
Dec 30, 2024
Merged

Conversation

LZoog
Copy link
Contributor

@LZoog LZoog commented Dec 23, 2024

Because:

  • We should display these ToS/PP when users are signing up for Relay

This commit:

  • Adds logic to account for this in content-server for email-first, and React for signin/signup

closes FXA-10819

@LZoog LZoog requested a review from a team as a code owner December 23, 2024 23:57
isDesktopRelay = false,
}: TermsPrivacyAgreementProps) => {
return (
<div
className={`text-grey-500 text-xs ${isDesktopRelay ? 'mt-8' : 'mt-5'}`}
>
{isPocketClient || isMonitorClient || isDesktopRelay ? (
{isPocketClient || isMonitorClient || isDesktopRelay || isRelayClient ? (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we check for so many of these now, I think we might want a follow up issue to just take in clientId here and let this component do the checks. The way we have it now does make storybook and tests easier for this component, though. (We'd just be moving some mocking from other components into mocking for this.)

Copy link
Contributor

@vpomerleau vpomerleau Dec 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since three of these conditions display terms for subscription services, we could have a isSubscriptionsService function (mentioning as part of the possible follow-up, not required for this PR)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, though not all subscription services want this displayed and isDesktopRelay is kind of a weird one. Maybe just shouldShowSubscriptionTOS or something 🤷‍♀️

Copy link
Contributor

@vpomerleau vpomerleau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally by adding the 123Done client id to the client matching/mixin, works as expected! 🎉

One requested change (though it doesn't really have any functional impact!), and one question:

  • would you also like to add the relay client check to the reactified index page?

packages/fxa-settings/src/pages/Signin/index.tsx Outdated Show resolved Hide resolved
isDesktopRelay = false,
}: TermsPrivacyAgreementProps) => {
return (
<div
className={`text-grey-500 text-xs ${isDesktopRelay ? 'mt-8' : 'mt-5'}`}
>
{isPocketClient || isMonitorClient || isDesktopRelay ? (
{isPocketClient || isMonitorClient || isDesktopRelay || isRelayClient ? (
Copy link
Contributor

@vpomerleau vpomerleau Dec 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since three of these conditions display terms for subscription services, we could have a isSubscriptionsService function (mentioning as part of the possible follow-up, not required for this PR)

Because:
* We should display these ToS/PP when users are signing up for Relay

This commit:
* Adds logic to account for this in content-server for email-first, and React for signin/signup

closes FXA-10819
@LZoog LZoog merged commit cb13321 into main Dec 30, 2024
26 checks passed
@LZoog LZoog deleted the FXA-10819 branch December 30, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants