From 2b77e03169d99788453170beecad3481fd987fa9 Mon Sep 17 00:00:00 2001 From: jvega190 Date: Mon, 27 Jul 2026 14:55:05 -0600 Subject: [PATCH 1/3] [1005E] Properly spread props to PasswordTextFIeld --- .../PasswordTextField/PasswordTextField.tsx | 40 +++++++++++-------- .../ResetPasswordDialog.tsx | 5 ++- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/studio-ui/ui/app/src/components/PasswordTextField/PasswordTextField.tsx b/studio-ui/ui/app/src/components/PasswordTextField/PasswordTextField.tsx index ac5c91108..77616a5d5 100644 --- a/studio-ui/ui/app/src/components/PasswordTextField/PasswordTextField.tsx +++ b/studio-ui/ui/app/src/components/PasswordTextField/PasswordTextField.tsx @@ -37,7 +37,7 @@ const translations = defineMessages({ }); const PasswordTextField = React.forwardRef((props, ref) => { - const { visibilitySwitch = true, initialVisible = false, sxs } = props; + const { visibilitySwitch = true, initialVisible = false, sxs, slotProps, InputProps, ...textFieldProps } = props; const { formatMessage } = useIntl(); const [showPassword, setShowPassword] = useState(initialVisible); const inputRef = useRef(undefined); @@ -50,33 +50,41 @@ const PasswordTextField = React.forwardRef + + {showPassword ? : } + + + ); + return ( - - {showPassword ? : } - - - ) + ...slotProps?.input, + ...InputProps, + endAdornment: visibilityAdornment + } + : { + ...slotProps?.input, + ...InputProps } - : props.InputProps }} /> ); diff --git a/studio-ui/ui/app/src/components/ResetPasswordDialog/ResetPasswordDialog.tsx b/studio-ui/ui/app/src/components/ResetPasswordDialog/ResetPasswordDialog.tsx index 5044a7c18..1eabc985d 100644 --- a/studio-ui/ui/app/src/components/ResetPasswordDialog/ResetPasswordDialog.tsx +++ b/studio-ui/ui/app/src/components/ResetPasswordDialog/ResetPasswordDialog.tsx @@ -30,6 +30,7 @@ import { showSystemNotification } from '../../state/actions/system'; import PasswordTextField from '../PasswordTextField/PasswordTextField'; import { PasswordStrengthDisplayPopper } from '../PasswordStrengthDisplayPopper'; import { pushErrorDialog } from '../../utils/system'; +import { USER_PASSWORD_MAX_LENGTH } from '../UserManagement/utils'; interface ResetPasswordDialogProps { open: boolean; @@ -109,7 +110,9 @@ function ResetPasswordDialogUI(props: ResetPasswordDialogProps) { }} onFocus={(e) => setAnchorEl(e.target)} onBlur={() => setAnchorEl(null)} - inputProps={{ autoComplete: 'new-password' }} + slotProps={{ + htmlInput: { maxLength: USER_PASSWORD_MAX_LENGTH, autoComplete: 'new-password' } + }} /> Date: Mon, 27 Jul 2026 15:15:23 -0600 Subject: [PATCH 2/3] Add maxLength to PasswordTestField usages --- .../AccountManagement/AccountManagement.tsx | 11 ++++++++++- .../ui/app/src/components/LoginView/LoginView.tsx | 9 +++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/studio-ui/ui/app/src/components/AccountManagement/AccountManagement.tsx b/studio-ui/ui/app/src/components/AccountManagement/AccountManagement.tsx index f0ac0fcdb..31d3dfcda 100644 --- a/studio-ui/ui/app/src/components/AccountManagement/AccountManagement.tsx +++ b/studio-ui/ui/app/src/components/AccountManagement/AccountManagement.tsx @@ -59,6 +59,7 @@ import { setStoredEnableAnimations, setStoredSnackbarDuration } from '../../utils/state'; +import { USER_PASSWORD_MAX_LENGTH } from '../UserManagement/utils'; const decrementButtonSx: BoxProps['sx'] = { borderTopRightRadius: 0, @@ -279,6 +280,9 @@ export function AccountManagement(props: AccountManagementProps) { onChange={(e) => { setCurrentPassword(e.target.value); }} + slotProps={{ + htmlInput: { maxLength: USER_PASSWORD_MAX_LENGTH } + }} /> setAnchorEl(e.target)} onBlur={() => setAnchorEl(null)} - inputProps={{ autoComplete: 'new-password' }} + slotProps={{ + htmlInput: { maxLength: USER_PASSWORD_MAX_LENGTH, autoComplete: 'new-password' } + }} /> ) } + slotProps={{ + htmlInput: { maxLength: USER_PASSWORD_MAX_LENGTH } + }} /> setAnchorEl(e.target)} onBlur={() => setAnchorEl(null)} - inputProps={{ autoComplete: 'new-password' }} + slotProps={{ + htmlInput: { maxLength: USER_PASSWORD_MAX_LENGTH, autoComplete: 'new-password' } + }} /> {children} From 948d39417d894df13c488ed1d5db87e612c38b65 Mon Sep 17 00:00:00 2001 From: jvega190 Date: Mon, 27 Jul 2026 15:21:55 -0600 Subject: [PATCH 3/3] Set autocomplete tokens on the remaining password fields. --- .../src/components/AccountManagement/AccountManagement.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/studio-ui/ui/app/src/components/AccountManagement/AccountManagement.tsx b/studio-ui/ui/app/src/components/AccountManagement/AccountManagement.tsx index 31d3dfcda..d209b3bd9 100644 --- a/studio-ui/ui/app/src/components/AccountManagement/AccountManagement.tsx +++ b/studio-ui/ui/app/src/components/AccountManagement/AccountManagement.tsx @@ -281,7 +281,7 @@ export function AccountManagement(props: AccountManagementProps) { setCurrentPassword(e.target.value); }} slotProps={{ - htmlInput: { maxLength: USER_PASSWORD_MAX_LENGTH } + htmlInput: { maxLength: USER_PASSWORD_MAX_LENGTH, autoComplete: 'current-password' } }} />