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

Add ability to opt in to Email communication #3212

Merged
merged 5 commits into from
May 14, 2024

Conversation

mathjazz
Copy link
Collaborator

@mathjazz mathjazz commented May 10, 2024

Fix #3211.

Adds Email section to the user settings, which includes the existing Contact email address field and the newly added Email communication toggle. To match the existing UI patterns, I've used the shorter Checkbox label as required by the spec and joined the checkbox label and subtitle from the spec into the help text, which is configurable by instance.

The patch is deployed to stage:
https://mozilla-pontoon-staging.herokuapp.com/settings/

We'll also need to update the docs:
https://mozilla-l10n.github.io/localizer-documentation/tools/pontoon/users.html

@mathjazz mathjazz requested a review from harmitgoswami May 10, 2024 16:06
Copy link
Collaborator

@harmitgoswami harmitgoswami left a comment

Choose a reason for hiding this comment

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

LGTM! However, when I try to access the stage, I'm denied permission. Is this supposed to happen?

@mathjazz
Copy link
Collaborator Author

Can you try to Sign in?

@harmitgoswami
Copy link
Collaborator

Okay it works now! All good on my end

@mathjazz
Copy link
Collaborator Author

To match the existing UI patterns, I've used the shorter Checkbox label as required by the spec and joined the checkbox label and subtitle from the spec into the help text, which is configurable by instance.

@bcolsson As the author of the spec, do you approve these changes? Please check out the implementation on stage!

@flodolo flodolo changed the title Add ability to opt-in to Email communication Add ability to opt in to Email communication May 13, 2024
Copy link
Collaborator

@flodolo flodolo left a comment

Choose a reason for hiding this comment

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

According to the specs, Contact email address -> Contact email address (optional)

Receive the latest updates about localization at Mozilla, announcements about new Pontoon features, receive invitations to contributor events and more.

Good call on removing the duplicate "receive" here, but

Agree to Mozilla handling your personal information as explained in this Privacy Notice.

Missing a I.

</div>
</section>
<ul class="check-list">
{{ Checkbox.checkbox('Email communication', class='field email-communications-enabled', attribute='email_communications_enabled', is_enabled=user.profile.email_communications_enabled, title='Receive email updates', help=settings.EMAIL_COMMUNICATION_HELP_TEXT) }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should still be plural (communications)?

@mathjazz
Copy link
Collaborator Author

According to the specs, Contact email address -> Contact email address (optional)

Are you suggesting we append (optional) to the label?

All fields in the settings are optional. So I don't think it makes sense.

Agree to Mozilla handling your personal information as explained in this Privacy Notice.

Missing a I.

The first sentence is in the Imperative(?) mood. The second should be in the same. Hence - "Agree to ... your", rather than "I agree to ... my".

@flodolo
Copy link
Collaborator

flodolo commented May 13, 2024

Are you suggesting we append (optional) to the label?

That's how I interpret the specs, but let's wait for Bryan.

The first sentence is in the Imperative(?) mood. The second should be in the same. Hence - "Agree to ... your", rather than "I agree to ... my".

Good point, but it still sounds weird to me. Maybe add "By selecting/checking this, you"?

Receive the latest updates about localization at Mozilla, announcements about new Pontoon features, invitations to contributor events and more. By selecting this, you agree to Mozilla handling your personal information as explained in this Privacy Notice.

@mathjazz
Copy link
Collaborator Author

Updated the text. I used the same copy as in the standalone page:
https://github.com/mozilla/pontoon/blob/main/specs/0117-email-opt-in-unsubscribe.md#standalone-page-for-email-opt-in-consent-shown-after-existing-user-login

Accordingly, I also replaced "Receive" with "Get".

@bcolsson
Copy link
Collaborator

bcolsson commented May 13, 2024

According to the specs, Contact email address -> Contact email address (optional)

Are you suggesting we append (optional) to the label?

All fields in the settings are optional. So I don't think it makes sense.

Agree to Mozilla handling your personal information as explained in this Privacy Notice.

Missing a I.

The first sentence is in the Imperative(?) mood. The second should be in the same. Hence - "Agree to ... your", rather than "I agree to ... my".

These were both requests from legal.

Let's leave "I agree.." as that's the wording the specifically requested.
Edit: Now that I'm checking it out on stage, it looks like that's what you updated the text too. So that's a 👍 from me.

As for "Optional", legal was concerned that users would be confused in the instance where they want to have their marketing and login email be the same. In practice they just need to enable the check box to for the consent, but they requested to add something to clarify that specifying an email address in the Contact email address field is optional. I added it to the label, but we could just as easily add it to the text underneath.

@bcolsson
Copy link
Collaborator

bcolsson commented May 13, 2024

To match the existing UI patterns, I've used the shorter Checkbox label as required by the spec and joined the checkbox label and subtitle from the spec into the help text, which is configurable by instance.

@bcolsson As the author of the spec, do you approve these changes? Please check out the implementation on stage!

@mathjazz Is there a way to add a line break to separate out the privacy notice to make it more distinct?

@mathjazz
Copy link
Collaborator Author

As for "Optional", legal was concerned that users would be confused in the instance where they want to have their marketing and login email be the same. In practice they just need to enable the check box to for the consent, but they requested to add something to clarify that specifying an email address in the Contact email address field is optional. I added it to the label, but we could just as easily add it to the text underneath.

OK, I see the confusion. How about we put the login email as the placeholder, so it would appear if contact email address is not set?

How should we change the text underneath, which already implies the email address is optional ("If you would like to...")? Replace "please do so here" with "you can optionally do so here"?

@mathjazz Is there a way to add a line break to separate out the privacy notice to make it more distinct?

Done. Please check on stage if that's better. I think it looks and reads even better with a double line break (you can use devtools to test that), but then it's not immediately clear the text is related to the checkbox.

@bcolsson
Copy link
Collaborator

OK, I see the confusion. How about we put the login email as the placeholder, so it would appear if contact email address is not set?

I think that's a great solution.

Done. Please check on stage if that's better. I think it looks and reads even better with a double line break (you can use devtools to test that), but then it's not immediately clear the text is related to the checkbox.

Agreed - I like the double line break. Also, I think the double line break is still understandable it relates to enabling email communications / the related checkbox due to indenting and the language "By enabling...".

@mathjazz
Copy link
Collaborator Author

Stage updated with the placeholder and the additional line break:
https://mozilla-pontoon-staging.herokuapp.com/settings/

@bcolsson
Copy link
Collaborator

Staging looking good to me 👍

@@ -23,7 +23,7 @@ services:

# Database
postgresql:
image: postgres:15
image: postgres:13.4
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why this change? 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nice catch. Fixed!

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.

Add Email communication settings
4 participants