From f2788fc76526d3bd417ed05a8321636773a2a024 Mon Sep 17 00:00:00 2001 From: Rene Turcios <95189389+CloudCorpRecords@users.noreply.github.com> Date: Tue, 13 Oct 2026 09:49:05 -0700 Subject: [PATCH] refactor(auth): use shared Field in Login, ForgotPassword and PasswordChangeRequired Replace the hand-built label + control (+ error) markup on the three auth pages with Field. Login keeps its existing label/control styling via labelProps and the native required attribute (no visual asterisk, as before). ForgotPassword's email error now comes from Field (aria-invalid, aria-describedby, role=alert) instead of a hand-wired id. The read-only email on PasswordChangeRequired uses Field for its label. Refs IBM/mcp-context-forge#7007 Co-Authored-By: Claude Sonnet 5.5 Signed-off-by: Rene Turcios <95189389+CloudCorpRecords@users.noreply.github.com> --- src/pages/ForgotPassword.tsx | 48 ++++++++---------- src/pages/Login.tsx | 74 +++++++++++++++------------- src/pages/PasswordChangeRequired.tsx | 16 +++--- 3 files changed, 69 insertions(+), 69 deletions(-) diff --git a/src/pages/ForgotPassword.tsx b/src/pages/ForgotPassword.tsx index 3e05b457..5f885b6d 100644 --- a/src/pages/ForgotPassword.tsx +++ b/src/pages/ForgotPassword.tsx @@ -6,7 +6,7 @@ import { AuthCard } from "@/components/auth/AuthCard"; import { Button } from "@/components/ui/button"; import { InlineNotification } from "@/components/ui/inline-notification"; import { Input } from "@/components/ui/input"; -import { Label } from "@/components/ui/label"; +import { Field } from "@/components/ui/field"; import { useRouter } from "@/router"; export function ForgotPassword() { @@ -71,33 +71,27 @@ export function ForgotPassword() { ) : (
-
- - { - setEmail(event.target.value); - setEmailError(null); - }} - aria-invalid={!!emailError} - aria-describedby={emailError ? "forgot-password-email-error" : undefined} - /> - {emailError && ( - + + {(controlProps) => ( + { + setEmail(event.target.value); + setEmailError(null); + }} + /> )} -
+ {error && }