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

fix(ui): update copy #1875

Merged
merged 1 commit into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions e2e/backup.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ d('Backup', () => {

// add price widget
await element(by.id('WidgetsAdd')).tap();
await element(by.id('ContinueWidgets-0')).tap();
await element(by.id('ContinueWidgets-1')).tap();
await element(by.id('WidgetsOnboarding-button')).tap();
await element(by.id('PriceWidget')).tap();
// for unknown reason await waitFor(element(by.id('HourglassSpinner'))).not.toBeVisible();
// doesn't work here, so instead we just wait until we can tap WidgetSave
Expand Down
3 changes: 1 addition & 2 deletions e2e/widgets.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ d('Widgets', () => {

// add price widget
await element(by.id('WidgetsAdd')).tap();
await element(by.id('ContinueWidgets-0')).tap();
await element(by.id('ContinueWidgets-1')).tap();
await element(by.id('WidgetsOnboarding-button')).tap();
await element(by.id('PriceWidget')).tap();
await waitFor(element(by.id('WidgetEdit')))
.toBeVisible()
Expand Down
Binary file removed src/assets/illustrations/book.png
Binary file not shown.
Binary file modified src/assets/illustrations/group.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 2 additions & 4 deletions src/components/Suggestions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
newChannelsNotificationsSelector,
todosFullSelector,
} from '../store/reselect/todos';
import { lightningSettingUpStepSelector } from '../store/reselect/user';
import { pinSelector } from '../store/reselect/settings';
import { useAppDispatch, useAppSelector } from '../hooks/redux';
import type { RootNavigationProp } from '../navigation/types';
Expand All @@ -34,7 +33,6 @@ const Suggestions = (): ReactElement => {
const dispatch = useAppDispatch();
const pinTodoDone = useAppSelector(pinSelector);
const suggestions = useAppSelector(todosFullSelector);
const lightningSettingUpStep = useAppSelector(lightningSettingUpStepSelector);
const newChannels = useAppSelector(newChannelsNotificationsSelector);
const [index, setIndex] = useState(0);

Expand Down Expand Up @@ -126,7 +124,7 @@ const Suggestions = (): ReactElement => {
}

if (item.id === 'lightningSettingUp') {
description = t(`${item.id}.description${lightningSettingUpStep}`);
description = t(`${item.id}.description`);
}

return (
Expand All @@ -145,7 +143,7 @@ const Suggestions = (): ReactElement => {
/>
);
},
[t, handleOnPress, lightningSettingUpStep, dispatch],
[t, handleOnPress, dispatch],
);

if (!suggestions.length) {
Expand Down
83 changes: 0 additions & 83 deletions src/components/WalletWarning.tsx

This file was deleted.

4 changes: 3 additions & 1 deletion src/components/Widgets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ const Widgets = (): ReactElement => {
);

const onAdd = (): void => {
const screen = onboardedWidgets ? 'WidgetsSuggestions' : 'HelloWidgets';
const screen = onboardedWidgets
? 'WidgetsSuggestions'
: 'WidgetsOnboarding';
rootNavigation.navigate(screen);
};

Expand Down
4 changes: 2 additions & 2 deletions src/navigation/bottom-sheet/BackupNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export type BackupStackParamList = {
ShowPassphrase: { seed: string[]; bip39Passphrase: string };
ConfirmMnemonic: { seed: string[]; bip39Passphrase: string };
ConfirmPassphrase: { bip39Passphrase: string };
Success: undefined;
Warning: undefined;
Success: undefined;
MultipleDevices: undefined;
Metadata: undefined;
};
Expand Down Expand Up @@ -59,8 +59,8 @@ const BackupNavigation = (): ReactElement => {
name="ConfirmPassphrase"
component={ConfirmPassphrase}
/>
<Stack.Screen name="Success" component={Success} />
<Stack.Screen name="Warning" component={Warning} />
<Stack.Screen name="Success" component={Success} />
<Stack.Screen name="MultipleDevices" component={MultipleDevices} />
<Stack.Screen name="Metadata" component={Metadata} />
</Stack.Group>
Expand Down
8 changes: 2 additions & 6 deletions src/navigation/root/RootNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ import LNURLPayNavigation from '../bottom-sheet/LNURLPayNavigation';
import OrangeTicket from '../../screens/OrangeTicket';
import TreasureHuntNavigation from '../bottom-sheet/TreasureHuntNavigation';
import WidgetsSuggestions from '../../screens/Widgets/WidgetsSuggestions';
import {
HelloWidgets,
GoodbyePasswords,
} from '../../screens/Widgets/WidgetsOnboarding';
import WidgetsOnboarding from '../../screens/Widgets/WidgetsOnboarding';
import { __E2E__ } from '../../constants/env';
import type { RootStackParamList } from '../types';

Expand Down Expand Up @@ -217,8 +214,7 @@ const RootNavigator = (): ReactElement => {
<Stack.Screen name="ContactEdit" component={ContactEdit} />
<Stack.Screen name="Contact" component={Contact} />
<Stack.Screen name="BuyBitcoin" component={BuyBitcoin} />
<Stack.Screen name="HelloWidgets" component={HelloWidgets} />
<Stack.Screen name="GoodbyePasswords" component={GoodbyePasswords} />
<Stack.Screen name="WidgetsOnboarding" component={WidgetsOnboarding} />
<Stack.Screen
name="WidgetsSuggestions"
component={WidgetsSuggestions}
Expand Down
3 changes: 1 addition & 2 deletions src/navigation/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ export type RootStackParamList = {
ContactEdit: { url: string };
Contact: { url: string };
BuyBitcoin: undefined;
GoodbyePasswords: undefined;
HelloWidgets: undefined;
WidgetsOnboarding: undefined;
WidgetsSuggestions: undefined;
Widget: {
url: string;
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Contacts/ContactsOnboarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { setOnboardedContacts } from '../../store/slices/slashtags';
import { RootStackParamList } from '../../navigation/types';
import OnboardingScreen from '../../components/OnboardingScreen';

const imageSrc = require('../../assets/illustrations/book.png');
const imageSrc = require('../../assets/illustrations/group.png');

type ContactsOnboardingProps = StackScreenProps<RootStackParamList, 'Contacts'>;

Expand Down
6 changes: 2 additions & 4 deletions src/screens/Lightning/Success.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { BodyMB, Display } from '../../styles/text';
import InfoScreen from '../../components/InfoScreen';
import type { LightningScreenProps } from '../../navigation/types';

const readyImage = require('../../assets/illustrations/check.png');
const transferImage = require('../../assets/illustrations/transfer.png');
const imageSrc = require('../../assets/illustrations/check.png');

const Success = ({
navigation,
Expand All @@ -22,7 +21,6 @@ const Success = ({
const isTransferToSavings = type === 'savings';
const title = isTransferToSavings ? 'ts_savings_title' : 'result_header';
const description = isTransferToSavings ? 'ts_savings_text' : 'result_text';
const image = isTransferToSavings ? transferImage : readyImage;
const buttonText = isTransferToSavings ? t('ok') : t('awesome');

return (
Expand All @@ -43,7 +41,7 @@ const Success = ({
components={{ accent: <BodyMB color="white" /> }}
/>
}
image={image}
image={imageSrc}
buttonText={buttonText}
testID="TransferSuccess"
onButtonPress={onContinue}
Expand Down
13 changes: 9 additions & 4 deletions src/screens/Onboarding/Slideshow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import Animated, {
import { Trans, useTranslation } from 'react-i18next';

import { View as ThemedView } from '../../styles/components';
import { Display, BodyMSB, BodyM } from '../../styles/text';
import { Display, BodyMSB, BodyM, BodyMB } from '../../styles/text';
import { IThemeColors } from '../../styles/themes';
import SafeAreaInset from '../../components/SafeAreaInset';
import Dot from '../../components/SliderDots';
Expand Down Expand Up @@ -97,9 +97,14 @@ const Slide = ({
parent={Display}
components={{ accent: <Display color={color} /> }}
/>
<BodyM style={styles.text} color="secondary">
{t(`slide${index}_text`)}
</BodyM>
<Trans
style={styles.text}
t={t}
i18nKey={`slide${index}_text`}
parent={BodyM}
color="secondary"
components={{ accent: <BodyMB color="primary" /> }}
/>

{isLast ? (
<View style={styles.buttonsContainer}>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Settings/Backup/ConfirmMnemonic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const ConfirmMnemonic = ({
if (bip39Passphrase) {
navigation.navigate('ConfirmPassphrase', { bip39Passphrase });
} else {
navigation.navigate('Success');
navigation.navigate('Warning');
}
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Settings/Backup/ConfirmPassphrase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const ConfirmPassphrase = ({
disabled={bip39Passphrase !== origPass}
size="large"
text={t('continue')}
onPress={(): void => navigation.navigate('Success')}
onPress={(): void => navigation.navigate('Warning')}
/>
</View>
</View>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Settings/Backup/Success.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Success = ({

const handleButtonPress = (): void => {
dispatch(verifyBackup());
navigation.navigate('Warning');
navigation.navigate('MultipleDevices');
};

return (
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Settings/Backup/Warning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Warning = ({
const { t } = useTranslation('security');

const handleButtonPress = (): void => {
navigation.navigate('MultipleDevices');
navigation.navigate('Success');
};

return (
Expand Down
2 changes: 0 additions & 2 deletions src/screens/Wallets/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import Suggestions from '../../components/Suggestions';
import Widgets from '../../components/Widgets';
import SafeAreaInset from '../../components/SafeAreaInset';
import WalletOnboarding from '../../components/WalletOnboarding';
import WalletWarning from '../../components/WalletWarning';
import Balances from '../../components/Balances';
import Header from './Header';
import type { WalletScreenProps } from '../../navigation/types';
Expand Down Expand Up @@ -138,7 +137,6 @@ const Wallets = ({ navigation, onFocus }: Props): ReactElement => {
<Balances />
{showWidgets && <Widgets />}
<ActivityListShort />
<WalletWarning />
</View>
</>
) : (
Expand Down
Loading
Loading