Skip to content

Commit

Permalink
fix(notifications): hide profile sync toggle (#10900)
Browse files Browse the repository at this point in the history
<!--
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**

This feature is still under development and should not be shown.

This is to be ported into: 7.30.0


<!--
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: https://consensyssoftware.atlassian.net/browse/NOTIFY-1030

## **Manual testing steps**

1. Go through onboarding
2. Visit advanced configuration
3. The Profile Sync toggle should not be visible on mobile production

## **Screenshots/Recordings**

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

### **Before**

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


![image](https://github.com/user-attachments/assets/437dcebb-98d2-434d-b531-51284149875e)


### **After**

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

![Screenshot 2024-08-29 at 18 30
55](https://github.com/user-attachments/assets/b0523213-862b-4c5d-b6ea-a6fe965b2ccc)

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] 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.
  • Loading branch information
Prithpal-Sooriya authored Aug 30, 2024
1 parent c2f9300 commit d98a1c9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 267 deletions.
13 changes: 12 additions & 1 deletion app/components/UI/ProfileSyncing/ProfileSyncing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ import styles from './ProfileSyncing.styles';
import { ProfileSyncingComponentProps } from './ProfileSyncing.types';
import AppConstants from '../../../core/AppConstants';
import { useProfileSyncing } from '../../../util/notifications/hooks/useProfileSyncing';
import { isNotificationsFeatureEnabled } from '../../../util/notifications';

export default function ProfileSyncingComponent({
function ProfileSyncingComponent({
handleSwitchToggle,
isBasicFunctionalityEnabled,
isProfileSyncingEnabled,
Expand Down Expand Up @@ -62,3 +63,13 @@ export default function ProfileSyncingComponent({
</View>
);
}

export default function ProfileSyncingContainer(
props: Readonly<ProfileSyncingComponentProps>,
) {
if (!isNotificationsFeatureEnabled()) {
return null;
}

return <ProfileSyncingComponent {...props} />;
}
Original file line number Diff line number Diff line change
@@ -1,92 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`ProfileSyncing should render correctly 1`] = `
<View
style={
{
"marginVertical": 16,
}
}
>
<View
style={
{
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "space-between",
"paddingBottom": 8,
}
}
>
<Text
accessibilityRole="text"
style={
{
"color": "#141618",
"fontFamily": "EuclidCircularB-Bold",
"fontSize": 16,
"fontWeight": "700",
"letterSpacing": 0,
"lineHeight": 24,
}
}
>
Profile Sync
</Text>
<RCTSwitch
accessibilityRole="switch"
disabled={true}
onChange={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
onTintColor="#0376c9"
style={
[
{
"height": 31,
"width": 51,
},
{
"backgroundColor": "#bbc0c566",
"borderRadius": 16,
},
]
}
thumbTintColor="#ffffff"
tintColor="#bbc0c566"
value={false}
/>
</View>
<Text
accessibilityRole="text"
style={
{
"color": "#6a737d",
"fontFamily": "EuclidCircularB-Regular",
"fontSize": 14,
"fontWeight": "400",
"letterSpacing": 0,
"lineHeight": 22,
}
}
>
Creates a profile that MetaMask uses to sync some settings among your devices. This is required to get notifications.
<Text
accessibilityRole="text"
onPress={[Function]}
style={
{
"color": "#0376c9",
"fontFamily": "EuclidCircularB-Regular",
"fontSize": 14,
"fontWeight": "400",
"letterSpacing": 0,
"lineHeight": 22,
}
}
>
Learn how we protect your privacy
</Text>
</Text>
</View>
`;
exports[`ProfileSyncing should render correctly 1`] = `null`;
Original file line number Diff line number Diff line change
Expand Up @@ -131,94 +131,6 @@ exports[`DefaultSettings should render correctly 1`] = `
to learn more.
</Text>
</View>
<View
style={
{
"marginVertical": 16,
}
}
>
<View
style={
{
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "space-between",
"paddingBottom": 8,
}
}
>
<Text
accessibilityRole="text"
style={
{
"color": "#141618",
"fontFamily": "EuclidCircularB-Bold",
"fontSize": 16,
"fontWeight": "700",
"letterSpacing": 0,
"lineHeight": 24,
}
}
>
Profile Sync
</Text>
<RCTSwitch
accessibilityRole="switch"
disabled={true}
onChange={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
onTintColor="#0376c9"
style={
[
{
"height": 31,
"width": 51,
},
{
"backgroundColor": "#bbc0c566",
"borderRadius": 16,
},
]
}
thumbTintColor="#ffffff"
tintColor="#bbc0c566"
value={false}
/>
</View>
<Text
accessibilityRole="text"
style={
{
"color": "#6a737d",
"fontFamily": "EuclidCircularB-Regular",
"fontSize": 14,
"fontWeight": "400",
"letterSpacing": 0,
"lineHeight": 22,
}
}
>
Creates a profile that MetaMask uses to sync some settings among your devices. This is required to get notifications.
<Text
accessibilityRole="text"
onPress={[Function]}
style={
{
"color": "#0376c9",
"fontFamily": "EuclidCircularB-Regular",
"fontSize": 14,
"fontWeight": "400",
"letterSpacing": 0,
"lineHeight": 22,
}
}
>
Learn how we protect your privacy
</Text>
</Text>
</View>
<View
style={
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -858,94 +858,6 @@ exports[`SecuritySettings should render correctly 1`] = `
</Text>
</View>
</View>
<View
style={
{
"marginVertical": 16,
}
}
>
<View
style={
{
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "space-between",
"paddingBottom": 8,
}
}
>
<Text
accessibilityRole="text"
style={
{
"color": "#141618",
"fontFamily": "EuclidCircularB-Bold",
"fontSize": 16,
"fontWeight": "700",
"letterSpacing": 0,
"lineHeight": 24,
}
}
>
Profile Sync
</Text>
<RCTSwitch
accessibilityRole="switch"
disabled={true}
onChange={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
onTintColor="#0376c9"
style={
[
{
"height": 31,
"width": 51,
},
{
"backgroundColor": "#bbc0c566",
"borderRadius": 16,
},
]
}
thumbTintColor="#ffffff"
tintColor="#bbc0c566"
value={true}
/>
</View>
<Text
accessibilityRole="text"
style={
{
"color": "#6a737d",
"fontFamily": "EuclidCircularB-Regular",
"fontSize": 14,
"fontWeight": "400",
"letterSpacing": 0,
"lineHeight": 22,
}
}
>
Creates a profile that MetaMask uses to sync some settings among your devices. This is required to get notifications.
<Text
accessibilityRole="text"
onPress={[Function]}
style={
{
"color": "#0376c9",
"fontFamily": "EuclidCircularB-Regular",
"fontSize": 14,
"fontWeight": "400",
"letterSpacing": 0,
"lineHeight": 22,
}
}
>
Learn how we protect your privacy
</Text>
</Text>
</View>
<Text
accessibilityRole="text"
style={
Expand Down

0 comments on commit d98a1c9

Please sign in to comment.