Scheduling infrastructure for absolutely everyone.
feat: add autocomplete to login and signup (#21065)
jen chana52a0e90e7cc
diff --git a/apps/web/modules/auth/login-view.tsx b/apps/web/modules/auth/login-view.tsxindex fb69e44e70c..3f46379fd5d 100644--- a/apps/web/modules/auth/login-view.tsx+++ b/apps/web/modules/auth/login-view.tsx@@ -15,15 +15,14 @@ import { HOSTED_CAL_FEATURES, WEBAPP_URL, WEBSITE_URL } from "@calcom/lib/constaimport { emailRegex } from "@calcom/lib/emailSchema";import { getSafeRedirectUrl } from "@calcom/lib/getSafeRedirectUrl";import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";-import { useLastUsed, LastUsed } from "@calcom/lib/hooks/useLastUsed";+import { LastUsed, useLastUsed } from "@calcom/lib/hooks/useLastUsed";import { useLocale } from "@calcom/lib/hooks/useLocale";import { useTelemetry } from "@calcom/lib/hooks/useTelemetry";import { collectPageParameters, telemetryEventTypes } from "@calcom/lib/telemetry";import { trpc } from "@calcom/trpc/react";import { Alert } from "@calcom/ui/components/alert";import { Button } from "@calcom/ui/components/button";-import { EmailField } from "@calcom/ui/components/form";-import { PasswordField } from "@calcom/ui/components/form";+import { EmailField, PasswordField } from "@calcom/ui/components/form";import type { inferSSRProps } from "@lib/types/inferSSRProps";import type { WithNonceProps } from "@lib/withNonce";@@ -254,12 +253,13 @@ PageProps & WithNonceProps<{}>) {defaultValue={totpEmail || (searchParams?.get("email") as string)}placeholder="[email protected]"required+ autoComplete="email"{...register("email")}/><div className="relative"><PasswordFieldid="password"- autoComplete="off"+ autoComplete="current-password"required={!totpEmail}className="mb-0"{...register("password")}diff --git a/apps/web/modules/signup-view.tsx b/apps/web/modules/signup-view.tsxindex b0fd210192a..d5f297d5633 100644--- a/apps/web/modules/signup-view.tsx+++ b/apps/web/modules/signup-view.tsx@@ -408,9 +408,11 @@ export default function Signup({) : null}{/* Email */}<TextField+ id="signup-email"{...register("email")}label={t("email")}type="email"+ autoComplete="email"disabled={prepopulateFormValues?.email}data-testid="signup-emailfield"/>@@ -418,7 +420,9 @@ export default function Signup({{/* Password */}{!isSamlSignup && (<PasswordField+ id="signup-password"data-testid="signup-passwordfield"+ autoComplete="new-password"label={t("password")}{...register("password")}hintErrors={["caplow", "min", "num"]}