From 3fe06d4c8e792bb95e85c98d4b53c91910a824a8 Mon Sep 17 00:00:00 2001 From: Alex Carpenter Date: Wed, 17 Jul 2024 14:17:19 -0400 Subject: [PATCH 1/2] mark signin fields as required --- packages/ui/src/common/email-or-phone-number-field.tsx | 8 +------- .../common/email-or-username-or-phone-number-field.tsx | 6 ------ packages/ui/src/components/sign-in/sign-in.tsx | 7 +++++++ 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/packages/ui/src/common/email-or-phone-number-field.tsx b/packages/ui/src/common/email-or-phone-number-field.tsx index 3f6ab646493..8080c97dbde 100644 --- a/packages/ui/src/common/email-or-phone-number-field.tsx +++ b/packages/ui/src/common/email-or-phone-number-field.tsx @@ -13,8 +13,6 @@ export function EmailOrPhoneNumberField({ labelEmail = 'Email address', labelPhoneNumber = 'Phone number', locationBasedCountryIso, - requiredEmail, - requiredPhoneNumber, toggleLabelEmail = 'Use email', toggleLabelPhoneNumber = 'Use phone', ...props @@ -22,11 +20,9 @@ export function EmailOrPhoneNumberField({ labelEmail?: React.ReactNode; labelPhoneNumber?: React.ReactNode; locationBasedCountryIso: React.ComponentProps['locationBasedCountryIso']; - requiredEmail?: boolean; - requiredPhoneNumber?: boolean; toggleLabelEmail?: string; toggleLabelPhoneNumber?: string; -} & Omit, 'required' | 'type'>) { +} & Omit, 'type'>) { const [showPhoneNumberField, setShowPhoneNumberField] = React.useState(false); const toggle = ( @@ -44,7 +40,6 @@ export function EmailOrPhoneNumberField({ label={labelPhoneNumber} locationBasedCountryIso={locationBasedCountryIso} alternativeFieldTrigger={toggle} - required={requiredPhoneNumber} name={name} {...props} /> @@ -54,7 +49,6 @@ export function EmailOrPhoneNumberField({ name={name} label={labelEmail} alternativeFieldTrigger={toggle} - required={requiredEmail} /> ); } diff --git a/packages/ui/src/common/email-or-username-or-phone-number-field.tsx b/packages/ui/src/common/email-or-username-or-phone-number-field.tsx index 0ae1170cb9e..9ee67fe9513 100644 --- a/packages/ui/src/common/email-or-username-or-phone-number-field.tsx +++ b/packages/ui/src/common/email-or-username-or-phone-number-field.tsx @@ -13,16 +13,12 @@ export function EmailOrUsernameOrPhoneNumberField({ labelEmailOrUsername = 'Email address or username', labelPhoneNumber = 'Phone number', locationBasedCountryIso, - requiredEmailOrUsername, - requiredPhoneNumber, toggleDescription = 'Toggle between email or username, and phone.', ...props }: { labelEmailOrUsername?: React.ReactNode; labelPhoneNumber?: React.ReactNode; locationBasedCountryIso: React.ComponentProps['locationBasedCountryIso']; - requiredEmailOrUsername?: boolean; - requiredPhoneNumber?: boolean; toggleDescription?: string; } & Omit, 'type'>) { const [showPhoneNumberField, setShowPhoneNumberField] = React.useState(false); @@ -44,7 +40,6 @@ export function EmailOrUsernameOrPhoneNumberField({ name={name} locationBasedCountryIso={locationBasedCountryIso} alternativeFieldTrigger={toggle} - required={requiredPhoneNumber} {...props} /> ) : ( @@ -53,7 +48,6 @@ export function EmailOrUsernameOrPhoneNumberField({ name={name} label={labelEmailOrUsername} alternativeFieldTrigger={toggle} - required={requiredEmailOrUsername} /> ); } diff --git a/packages/ui/src/components/sign-in/sign-in.tsx b/packages/ui/src/components/sign-in/sign-in.tsx index 37e95f3a875..842757883c8 100644 --- a/packages/ui/src/components/sign-in/sign-in.tsx +++ b/packages/ui/src/components/sign-in/sign-in.tsx @@ -80,6 +80,7 @@ export function SignInComponentLoaded() { ) : null} @@ -87,6 +88,7 @@ export function SignInComponentLoaded() { ) : null} @@ -95,6 +97,7 @@ export function SignInComponentLoaded() { name='identifier' disabled={isGlobalLoading} locationBasedCountryIso={locationBasedCountryIso} + required /> ) : null} @@ -102,6 +105,7 @@ export function SignInComponentLoaded() { ) : null} @@ -110,6 +114,7 @@ export function SignInComponentLoaded() { name='identifier' disabled={isGlobalLoading} locationBasedCountryIso={locationBasedCountryIso} + required /> ) : null} @@ -118,6 +123,7 @@ export function SignInComponentLoaded() { name='identifier' disabled={isGlobalLoading} locationBasedCountryIso={locationBasedCountryIso} + required /> ) : null} @@ -126,6 +132,7 @@ export function SignInComponentLoaded() { name='identifier' disabled={isGlobalLoading} locationBasedCountryIso={locationBasedCountryIso} + required /> ) : null} From 2737393186c7553f326a7f4824c9db5c3a0dd85d Mon Sep 17 00:00:00 2001 From: Alex Carpenter Date: Wed, 17 Jul 2024 14:22:25 -0400 Subject: [PATCH 2/2] add empty changeset --- .changeset/weak-geckos-fetch.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .changeset/weak-geckos-fetch.md diff --git a/.changeset/weak-geckos-fetch.md b/.changeset/weak-geckos-fetch.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/weak-geckos-fetch.md @@ -0,0 +1,2 @@ +--- +---