From 369d16c7c353ab7d75b470700e0cf12db1a8733e Mon Sep 17 00:00:00 2001 From: gorkem-bwl Date: Sat, 24 Jan 2026 19:41:25 -0500 Subject: [PATCH] fix: resolve password tooltip theme contrast and translation issues - Fix tooltip background using non-existent tertiary.background property by switching to tertiary.main - Fix Check component text color inheritance for noHighlightText by adding color: inherit to inner Typography - Add translation wrapper for validation error messages in PasswordPanel - Add translation wrapper for validation error messages in ProfilePanel --- client/src/Components/v1/Check/Check.jsx | 9 ++++++++- .../Pages/Account/components/PasswordPanel.jsx | 18 +++++++++++++++--- .../Pages/Account/components/ProfilePanel.jsx | 12 ++++++++++-- .../Pages/Auth/components/PasswordTooltip.jsx | 4 ++-- 4 files changed, 35 insertions(+), 8 deletions(-) diff --git a/client/src/Components/v1/Check/Check.jsx b/client/src/Components/v1/Check/Check.jsx index cc3749fda..c40f3de3e 100644 --- a/client/src/Components/v1/Check/Check.jsx +++ b/client/src/Components/v1/Check/Check.jsx @@ -56,7 +56,14 @@ const Check = ({ text, noHighlightText, variant = "info", outlined = false }) => fontWeight: 450, }} > - {noHighlightText && {noHighlightText}}{" "} + {noHighlightText && ( + + {noHighlightText} + + )}{" "} {text} diff --git a/client/src/Pages/Account/components/PasswordPanel.jsx b/client/src/Pages/Account/components/PasswordPanel.jsx index f54c61a16..e889db96c 100644 --- a/client/src/Pages/Account/components/PasswordPanel.jsx +++ b/client/src/Pages/Account/components/PasswordPanel.jsx @@ -167,7 +167,11 @@ const PasswordPanel = () => { value={localData.password} onChange={handleChange} error={errors[idToName["edit-current-password"]] ? true : false} - helperText={errors[idToName["edit-current-password"]]} + helperText={ + errors[idToName["edit-current-password"]] + ? t(errors[idToName["edit-current-password"]]) + : "" + } endAdornment={} flex={1} /> @@ -193,7 +197,11 @@ const PasswordPanel = () => { value={localData.newPassword} onChange={handleChange} error={errors[idToName["edit-new-password"]] ? true : false} - helperText={errors[idToName["edit-new-password"]]} + helperText={ + errors[idToName["edit-new-password"]] + ? t(errors[idToName["edit-new-password"]]) + : "" + } endAdornment={} flex={1} /> @@ -219,7 +227,11 @@ const PasswordPanel = () => { value={localData.confirm} onChange={handleChange} error={errors[idToName["edit-confirm-password"]] ? true : false} - helperText={errors[idToName["edit-confirm-password"]]} + helperText={ + errors[idToName["edit-confirm-password"]] + ? t(errors[idToName["edit-confirm-password"]]) + : "" + } endAdornment={} flex={1} /> diff --git a/client/src/Pages/Account/components/ProfilePanel.jsx b/client/src/Pages/Account/components/ProfilePanel.jsx index d59923ae4..dfe508879 100644 --- a/client/src/Pages/Account/components/ProfilePanel.jsx +++ b/client/src/Pages/Account/components/ProfilePanel.jsx @@ -210,7 +210,11 @@ const ProfilePanel = () => { autoComplete="given-name" onChange={handleChange} error={errors[idToName["edit-first-name"]] ? true : false} - helperText={errors[idToName["edit-first-name"]]} + helperText={ + errors[idToName["edit-first-name"]] + ? t(errors[idToName["edit-first-name"]]) + : "" + } flex={1} /> @@ -228,7 +232,11 @@ const ProfilePanel = () => { value={localData.lastName} onChange={handleChange} error={errors[idToName["edit-last-name"]] ? true : false} - helperText={errors[idToName["edit-last-name"]]} + helperText={ + errors[idToName["edit-last-name"]] + ? t(errors[idToName["edit-last-name"]]) + : "" + } flex={1} /> diff --git a/client/src/Pages/Auth/components/PasswordTooltip.jsx b/client/src/Pages/Auth/components/PasswordTooltip.jsx index 2881eb001..361850aca 100644 --- a/client/src/Pages/Auth/components/PasswordTooltip.jsx +++ b/client/src/Pages/Auth/components/PasswordTooltip.jsx @@ -75,7 +75,7 @@ const PasswordTooltip = ({ feedback, form, children }) => { slotProps={{ tooltip: { sx: { - backgroundColor: theme.palette.tertiary.background, + backgroundColor: theme.palette.tertiary.main, border: `0.5px solid ${theme.palette.primary.lowContrast}90`, borderRadius: theme.spacing(4), color: theme.palette.primary.contrastText, @@ -88,7 +88,7 @@ const PasswordTooltip = ({ feedback, form, children }) => { }, arrow: { sx: { - color: theme.palette.tertiary.background, + color: theme.palette.tertiary.main, }, }, }}