-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIXED: Text overflows in the user management card details #9532 #9541
Changes from 4 commits
03161e0
ef780bd
ce5e52c
e3e3f5c
294bbc7
cf114a7
88b3914
968eba3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,13 @@ import { useTranslation } from "react-i18next"; | |
import Card from "@/CAREUI/display/Card"; | ||
import CareIcon from "@/CAREUI/icons/CareIcon"; | ||
|
||
import { | ||
Tooltip, | ||
TooltipContent, | ||
TooltipProvider, | ||
TooltipTrigger, | ||
} from "@/components/ui/tooltip"; | ||
|
||
import { Avatar } from "@/components/Common/Avatar"; | ||
import Tabs from "@/components/Common/Tabs"; | ||
import SearchInput from "@/components/Form/SearchInput"; | ||
|
@@ -81,9 +88,21 @@ const getNameAndStatusCard = ( | |
<div className="flex flex-row justify-between gap-x-3"> | ||
<div className="flex flex-col"> | ||
<div className="flex items-center gap-x-3"> | ||
<h1 id={`name-${user.username}`} className="text-base font-bold"> | ||
{formatName(user)} | ||
</h1> | ||
<TooltipProvider delayDuration={200}> | ||
<Tooltip> | ||
<TooltipTrigger asChild> | ||
<h1 | ||
id={`name-${user.username}`} | ||
className="text-base font-bold truncate max-w-[200px]" | ||
> | ||
{formatName(user)} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Either, I can truncate or can decide some width or height to that popover There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Truncate the name on the card (Tooltip trigger). Tooltip Content is fine. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
</h1> | ||
</TooltipTrigger> | ||
<TooltipContent> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, I just added more styling and dynamic transitions on state and side. @Jacobjeevan |
||
<p>{formatName(user)}</p> | ||
</TooltipContent> | ||
</Tooltip> | ||
</TooltipProvider> | ||
<div | ||
className={classNames( | ||
"flex items-center gap-2 rounded-full px-3 py-1", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use rem values over pixels. pixels can behave differently on different DPIs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done