Skip to content
Open
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
7 changes: 7 additions & 0 deletions .changeset/plenty-toes-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@clerk/localizations": patch
"@clerk/shared": patch
"@clerk/ui": patch
---

Use distinct password placeholder for sign-up forms
1 change: 1 addition & 0 deletions packages/localizations/src/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ export const enUS: LocalizationResource = {
formFieldInputPlaceholder__organizationName: 'Organization name',
formFieldInputPlaceholder__organizationSlug: 'my-org',
formFieldInputPlaceholder__password: 'Enter your password',
formFieldInputPlaceholder__signUpPassword: 'Create a password',
formFieldInputPlaceholder__phoneNumber: 'Enter your phone number',
formFieldInputPlaceholder__username: 'Enter your username',
formFieldInput__emailAddress_format: 'Example format: name@example.com',
Expand Down
1 change: 1 addition & 0 deletions packages/shared/src/types/localization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export type __internal_LocalizationResource = {
formFieldInputPlaceholder__username: LocalizationValue;
formFieldInputPlaceholder__emailAddress_username: LocalizationValue;
formFieldInputPlaceholder__password: LocalizationValue;
formFieldInputPlaceholder__signUpPassword: LocalizationValue;
formFieldInputPlaceholder__firstName: LocalizationValue;
formFieldInputPlaceholder__lastName: LocalizationValue;
formFieldInputPlaceholder__backupCode: LocalizationValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ describe('SignInFactorOne', () => {
});
render(<SignInFactorOne />, { wrapper });
await screen.findByText('Password');
screen.getByPlaceholderText('Enter your password');
});

it('should render the other methods component when clicking on "Forgot password"', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/SignUp/SignUpContinue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function SignUpContinueInternal() {
password: useFormControl('password', '', {
type: 'password',
label: localizationKeys('formFieldLabel__password'),
placeholder: localizationKeys('formFieldInputPlaceholder__password'),
placeholder: localizationKeys('formFieldInputPlaceholder__signUpPassword'),
validatePassword: true,
}),
legalAccepted: useFormControl('legalAccepted', '', {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/SignUp/SignUpStart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function SignUpStartInternal(): JSX.Element {
password: useFormControl('password', '', {
type: 'password',
label: localizationKeys('formFieldLabel__password'),
placeholder: localizationKeys('formFieldInputPlaceholder__password'),
placeholder: localizationKeys('formFieldInputPlaceholder__signUpPassword'),
validatePassword: true,
buildErrorMessage: errors => createPasswordError(errors, { t, locale, passwordSettings }),
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ describe('SignUpContinue', () => {
// the email field will be lost
expect(screen.queryByText(/email address/i)).toBeInTheDocument();
expect(screen.queryByText(/password/i)).toBeInTheDocument();
screen.getByPlaceholderText('Create a password');
});

it('does not show email field if has been verified', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ describe('SignUpStart', () => {
render(<SignUpStart />, { wrapper });
screen.getByText('Email address');
screen.getByText('Password');
screen.getByPlaceholderText('Create a password');
});

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