Skip to content

Commit bd8d425

Browse files
authored
SELF-763: remove aesop features for now (#1132)
* clean onboarding camera screens * remove remaining aesop artifacts. fix tests
1 parent 20fa5c5 commit bd8d425

File tree

12 files changed

+2
-252
lines changed

12 files changed

+2
-252
lines changed

app/src/components/ButtonsContainer.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import React from 'react';
66
import { StyleSheet, View } from 'react-native';
77

8-
import { shouldShowAesopRedesign } from '@/hooks/useAesopRedesign';
9-
108
interface ButtonsContainerProps {
119
children: React.ReactNode;
1210
}
@@ -20,7 +18,7 @@ export default ButtonsContainer;
2018
const styles = StyleSheet.create({
2119
buttonsContainer: {
2220
display: 'flex',
23-
flexDirection: shouldShowAesopRedesign() ? 'row' : 'column',
21+
flexDirection: 'column',
2422
justifyContent: 'center',
2523
alignItems: 'center',
2624
gap: 10,

app/src/components/buttons/AbstractButton.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import type { ViewProps } from 'tamagui';
99
import { Button, Text } from 'tamagui';
1010

1111
import { pressedStyle } from '@/components/buttons/pressedStyle';
12-
import { shouldShowAesopRedesign } from '@/hooks/useAesopRedesign';
1312
import analytics from '@/utils/analytics';
1413
import { dinot } from '@/utils/fonts';
1514

@@ -95,7 +94,7 @@ const styles = StyleSheet.create({
9594
flexDirection: 'row',
9695
flexGrow: 0,
9796
flexShrink: 0,
98-
width: shouldShowAesopRedesign() ? '48%' : '100%',
97+
width: '100%',
9998
display: 'flex',
10099
alignItems: 'center',
101100
rowGap: 12,

app/src/components/typography/Additional.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import React from 'react';
66
import type { TextProps } from 'react-native';
77
import { StyleSheet, Text } from 'react-native';
88

9-
import { shouldShowAesopRedesign } from '@/hooks/useAesopRedesign';
109
import { slate400 } from '@/utils/colors';
1110
import { dinot } from '@/utils/fonts';
1211

@@ -31,9 +30,5 @@ const styles = StyleSheet.create({
3130
marginTop: 10,
3231
fontFamily: dinot,
3332
textTransform: 'none',
34-
...(shouldShowAesopRedesign() && {
35-
fontSize: 11.5,
36-
textTransform: 'uppercase',
37-
}),
3833
},
3934
});

app/src/components/typography/Description.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { StyleSheet } from 'react-native';
77
import type { TextProps } from 'tamagui';
88
import { Text } from 'tamagui';
99

10-
import { shouldShowAesopRedesign } from '@/hooks/useAesopRedesign';
1110
import { slate500 } from '@/utils/colors';
1211
import { dinot } from '@/utils/fonts';
1312

@@ -34,9 +33,5 @@ const styles = StyleSheet.create({
3433
lineHeight: 23,
3534
textAlign: 'center',
3635
fontFamily: dinot,
37-
...(shouldShowAesopRedesign() && {
38-
textAlign: 'left',
39-
fontSize: 16,
40-
}),
4136
},
4237
});

app/src/hooks/useAesopRedesign.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

app/src/navigation/aesop.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

app/src/navigation/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { createNativeStackNavigator } from '@react-navigation/native-stack';
1414

1515
import { DefaultNavBar } from '@/components/NavBar';
1616
import AppLayout from '@/layouts/AppLayout';
17-
import { getAesopScreens } from '@/navigation/aesop';
1817
import devScreens from '@/navigation/devTools';
1918
import documentScreens from '@/navigation/document';
2019
import homeScreens from '@/navigation/home';
@@ -33,8 +32,6 @@ export const navigationScreens = {
3332
...settingsScreens,
3433
...recoveryScreens,
3534
...devScreens, // allow in production for testing
36-
// add last to override other screens
37-
...getAesopScreens(),
3835
};
3936
const AppNavigation = createNativeStackNavigator({
4037
id: undefined,

app/src/screens/aesop/DocumentOnboardingScreen.tsx

Lines changed: 0 additions & 139 deletions
This file was deleted.

app/tests/src/hooks/useAesopRedesign.test.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

app/tests/src/navigation.test.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -51,26 +51,4 @@ describe('navigation', () => {
5151
'UnsupportedDocument',
5252
]);
5353
});
54-
55-
describe('Aesop design screen overrides', () => {
56-
beforeEach(() => {
57-
jest.resetModules();
58-
});
59-
60-
it('should use regular passport screens when shouldShowAesopRedesign is false', () => {
61-
const navigationScreens = require('@/navigation').navigationScreens;
62-
expect(
63-
navigationScreens.DocumentOnboarding.options.title,
64-
).toBeUndefined();
65-
});
66-
67-
it('should use aesop design passport screens when shouldShowAesopRedesign is true', () => {
68-
jest.mock('@/hooks/useAesopRedesign', () => ({
69-
shouldShowAesopRedesign: jest.fn().mockReturnValue(true),
70-
}));
71-
72-
const navigationScreens = require('@/navigation').navigationScreens;
73-
expect(navigationScreens.DocumentOnboarding.options.title).toBeDefined();
74-
});
75-
});
7654
});

0 commit comments

Comments
 (0)