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

chore: cherry-pick #9687 #9987

Merged
merged 1 commit into from
Jun 13, 2024
Merged

chore: cherry-pick #9687 #9987

merged 1 commit into from
Jun 13, 2024

Conversation

github-actions[bot]
Copy link
Contributor

This PR cherry-picks #9687

Adds data collection for marketing toggles (and toasts/warnings) on:
- Onboarding
- Toast in Wallet
- Settings page

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

## **Related issues**

Fixes:
MetaMask/MetaMask-planning#2525
MetaMask/MetaMask-planning#2439
MetaMask/MetaMask-planning#2440

## **Manual testing steps**


Onboarding checkbox:
Set `isPastPrivacyPolicyDate` to true in OptInMetrics
1. Start a new account
2. There should be a new checkbox that asks for marketing consent
3. Checking it should set the marketing consent to true (check at
Settings, Securty tab page)

Security tab:
1. Go to Security tab
2. When checking the "Data collection for marketing" to `true`, the
"Participate in MetaMetrics" toggle should turn to `true`
3. When checking "Participate in MetaMetrics" to `false`, "Data
collection for marketing" should be set to `false`
4. When "Participate in Metametrics" is `true` and "Data collection for
marketing" is `true`, and the latter is set to `false`, a warning
message should appear.

Toast:
An already onboarded user will have the "dataCollectionForMarketing"
value as `null` (neither `true` or `false`). This will trigger the
toast.
1. By clicking on "I accept", it should set the "Data collection for
marketing" to `true`.
2. By closing the toast or clicking on "No thanks", it should set the
"Data collection for marketing" to `false`.

All of these actions should trigger subsequent Segment events.


## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**



https://github.com/MetaMask/metamask-mobile/assets/11148144/d0ebee90-38e1-4362-92ad-73728c82df72

<img width="573" alt="Screenshot 2024-05-20 at 19 18 19"
src="https://github.com/MetaMask/metamask-mobile/assets/11148144/04538fdb-564e-4c75-9922-f0224bcbeec6">

<img width="573" alt="Screenshot 2024-05-20 at 19 19 30"
src="https://github.com/MetaMask/metamask-mobile/assets/11148144/347bf76a-e075-4647-b015-b1770814556b">



## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------

Co-authored-by: EtherWizard33 <eric.lamontagne@consensys.net>
Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com>
Co-authored-by: Curtis David <Curtis.David7@gmail.com>
Co-authored-by: tommasini <46944231+tommasini@users.noreply.github.com>
Co-authored-by: salimtb <salim.toubal@outlook.com>
@sethkfman sethkfman marked this pull request as ready for review June 13, 2024 21:10
@sethkfman sethkfman requested a review from a team as a code owner June 13, 2024 21:10
Copy link
Contributor

@sethkfman sethkfman left a comment

Choose a reason for hiding this comment

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

LGTM

@sethkfman sethkfman merged commit 81d9dd8 into release/7.24.2 Jun 13, 2024
3 checks passed
@sethkfman sethkfman deleted the chore/cherry-pick-9687 branch June 13, 2024 21:28
@github-actions github-actions bot locked and limited conversation to collaborators Jun 13, 2024
@metamaskbot metamaskbot added the release-7.24.3 Issue or pull request that will be included in release 7.24.3 label Jun 19, 2024
@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-7.24.3 on PR, as PR was cherry-picked in branch 7.24.3.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.24.3 Issue or pull request that will be included in release 7.24.3 team-wallet-ux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants