Skip to content

Commit 3940fbc

Browse files
committed
Refine app update prompt copy
1 parent 037fa5c commit 3940fbc

3 files changed

Lines changed: 13 additions & 14 deletions

File tree

src/components/AppUpdatePrompt/AppUpdatePrompt.test.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ describe('AppUpdatePrompt', () => {
1414
const onUpdate = jest.fn();
1515

1616
const messages: Record<string, string> = {
17-
'appUpdate.title': 'Update available',
18-
'appUpdate.description':
19-
'A new version of the app is ready. Update to load the latest cached files.',
20-
'appUpdate.action': 'Update app',
17+
'appUpdate.title': 'New version ready',
18+
'appUpdate.description': 'Refresh to get the latest fixes and schedule updates.',
19+
'appUpdate.action': 'Refresh now',
2120
};
2221

2322
jest.mocked(useTranslation).mockReturnValue({
@@ -28,9 +27,9 @@ describe('AppUpdatePrompt', () => {
2827

2928
render(<AppUpdatePrompt onUpdate={onUpdate} />);
3029

31-
expect(screen.getByRole('heading', { name: /update available/i })).toBeVisible();
30+
expect(screen.getByRole('heading', { name: /new version ready/i })).toBeVisible();
3231

33-
await user.click(screen.getByRole('button', { name: /update app/i }));
32+
await user.click(screen.getByRole('button', { name: /refresh now/i }));
3433

3534
expect(onUpdate).toHaveBeenCalledTimes(1);
3635
});

src/components/AppUpdatePrompt/AppUpdatePrompt.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ export function AppUpdatePrompt({ onUpdate }: AppUpdatePromptProps) {
1111
return (
1212
<div className="pointer-events-none fixed inset-x-0 bottom-4 z-50 flex justify-center px-4">
1313
<section className="pointer-events-auto w-full max-w-sm rounded-md border border-primary bg-panel p-4 shadow-lg">
14-
<div className="space-y-2">
15-
<h2 className="type-subheading">{t('appUpdate.title')}</h2>
16-
<p className="type-body-sm text-subtle">{t('appUpdate.description')}</p>
17-
</div>
18-
<div className="mt-4 flex">
14+
<div className="space-y-4">
15+
<div className="space-y-2">
16+
<h2 className="type-subheading">{t('appUpdate.title')}</h2>
17+
<p className="type-body-sm text-subtle">{t('appUpdate.description')}</p>
18+
</div>
1919
<Button className="w-full justify-center" onClick={onUpdate}>
2020
{t('appUpdate.action')}
2121
</Button>

src/i18n/en/translation.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ common:
132132
stage: Stage
133133
login: 'Login'
134134
appUpdate:
135-
title: 'Update available'
136-
description: 'A new version of the app is ready. Update to load the latest cached files.'
137-
action: 'Update app'
135+
title: 'New version ready'
136+
description: 'Refresh to get the latest fixes and schedule updates.'
137+
action: 'Refresh now'
138138
header:
139139
login: $t(common.login)
140140
logout: 'Logout'

0 commit comments

Comments
 (0)