Skip to content
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

fix(ui): prevent text descender cutoff in user dropdown #19309

Merged
merged 2 commits into from
Feb 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/features/shell/user-dropdown/UserDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ declare global {
interface UserDropdownProps {
small?: boolean;
}

export function UserDropdown({ small }: UserDropdownProps) {
const { isPlatformUser } = useGetUserAttributes();
const { t } = useLocale();
Expand Down Expand Up @@ -80,7 +81,7 @@ export function UserDropdown({ small }: UserDropdownProps) {
<span
className={classNames(
small ? "h-4 w-4" : "h-5 w-5 ltr:mr-2 rtl:ml-2",
"relative flex-shrink-0 rounded-full "
"relative flex-shrink-0 rounded-full"
)}>
<Avatar
size={small ? "xs" : "xsm"}
Expand All @@ -98,7 +99,7 @@ export function UserDropdown({ small }: UserDropdownProps) {
{!small && (
<span className="flex flex-grow items-center gap-2">
<span className="w-24 flex-shrink-0 text-sm leading-none">
<span className="text-emphasis block truncate font-medium">
<span className="text-emphasis block truncate py-0.5 font-medium leading-normal">
{user.name || "Nameless User"}
</span>
</span>
Expand Down
Loading