Skip to content

Commit 7707a31

Browse files
authored
chore(ui,localizations,shared): Use distinct password placeholder for sign-up forms (#8082)
1 parent 9a00a1c commit 7707a31

File tree

8 files changed

+14
-2
lines changed

8 files changed

+14
-2
lines changed

.changeset/plenty-toes-buy.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@clerk/localizations": patch
3+
"@clerk/shared": patch
4+
"@clerk/ui": patch
5+
---
6+
7+
Use distinct password placeholder for sign-up forms

packages/localizations/src/en-US.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ export const enUS: LocalizationResource = {
239239
formFieldInputPlaceholder__organizationName: 'Organization name',
240240
formFieldInputPlaceholder__organizationSlug: 'my-org',
241241
formFieldInputPlaceholder__password: 'Enter your password',
242+
formFieldInputPlaceholder__signUpPassword: 'Create a password',
242243
formFieldInputPlaceholder__phoneNumber: 'Enter your phone number',
243244
formFieldInputPlaceholder__username: 'Enter your username',
244245
formFieldInput__emailAddress_format: 'Example format: name@example.com',

packages/shared/src/types/localization.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ export type __internal_LocalizationResource = {
119119
formFieldInputPlaceholder__username: LocalizationValue;
120120
formFieldInputPlaceholder__emailAddress_username: LocalizationValue;
121121
formFieldInputPlaceholder__password: LocalizationValue;
122+
formFieldInputPlaceholder__signUpPassword: LocalizationValue;
122123
formFieldInputPlaceholder__firstName: LocalizationValue;
123124
formFieldInputPlaceholder__lastName: LocalizationValue;
124125
formFieldInputPlaceholder__backupCode: LocalizationValue;

packages/ui/src/components/SignIn/__tests__/SignInFactorOne.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ describe('SignInFactorOne', () => {
118118
});
119119
render(<SignInFactorOne />, { wrapper });
120120
await screen.findByText('Password');
121+
screen.getByPlaceholderText('Enter your password');
121122
});
122123

123124
it('should render the other methods component when clicking on "Forgot password"', async () => {

packages/ui/src/components/SignUp/SignUpContinue.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function SignUpContinueInternal() {
8181
password: useFormControl('password', '', {
8282
type: 'password',
8383
label: localizationKeys('formFieldLabel__password'),
84-
placeholder: localizationKeys('formFieldInputPlaceholder__password'),
84+
placeholder: localizationKeys('formFieldInputPlaceholder__signUpPassword'),
8585
validatePassword: true,
8686
}),
8787
legalAccepted: useFormControl('legalAccepted', '', {

packages/ui/src/components/SignUp/SignUpStart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function SignUpStartInternal(): JSX.Element {
109109
password: useFormControl('password', '', {
110110
type: 'password',
111111
label: localizationKeys('formFieldLabel__password'),
112-
placeholder: localizationKeys('formFieldInputPlaceholder__password'),
112+
placeholder: localizationKeys('formFieldInputPlaceholder__signUpPassword'),
113113
validatePassword: true,
114114
buildErrorMessage: errors => createPasswordError(errors, { t, locale, passwordSettings }),
115115
}),

packages/ui/src/components/SignUp/__tests__/SignUpContinue.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ describe('SignUpContinue', () => {
5151
// the email field will be lost
5252
expect(screen.queryByText(/email address/i)).toBeInTheDocument();
5353
expect(screen.queryByText(/password/i)).toBeInTheDocument();
54+
screen.getByPlaceholderText('Create a password');
5455
});
5556

5657
it('does not show email field if has been verified', async () => {

packages/ui/src/components/SignUp/__tests__/SignUpStart.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ describe('SignUpStart', () => {
4444
render(<SignUpStart />, { wrapper });
4545
screen.getByText('Email address');
4646
screen.getByText('Password');
47+
screen.getByPlaceholderText('Create a password');
4748
});
4849

4950
it('enables sign up with phone number and password', async () => {

0 commit comments

Comments
 (0)