Skip to content

Commit

Permalink
ui: fix overflow for long usernames (pinterest#1173)
Browse files Browse the repository at this point in the history
* ui: fix overflow for long usernames

* also fixed it for query execution invite
  • Loading branch information
czgu authored and aidenprice committed Jan 3, 2024
1 parent c5424f6 commit 6fcacf7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,10 @@
align-items: center;
text-align: right;
}

.user-badge-wrapper,
.user-badge-wrapper .UserBadge-names {
overflow: hidden;
}
}
}
6 changes: 5 additions & 1 deletion querybook/webapp/components/UserBadge/UserBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ export const UserBadge: React.FunctionComponent<IProps> = ({
>
<UserNameComponent userInfo={userInfo} loading={loading} />
</AccentText>
<AccentText className="handle" size="small" color="light">
<AccentText
className="handle one-line-ellipsis"
size="small"
color="light"
>
@{userName} {deletedText}
</AccentText>
</div>
Expand Down
2 changes: 1 addition & 1 deletion querybook/webapp/components/UserSelect/UserSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const UserSelectOptionRow: React.FC<{ user: IUserSearchResultRow }> = ({
return (
<div className="flex-row">
<UserAvatar tiny uid={user.id} />
<span className="ml4">{name}</span>
<span className="ml4 one-line-ellipsis">{name}</span>
</div>
);
};
5 changes: 5 additions & 0 deletions querybook/webapp/ui/ViewersList/ViewersList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,10 @@
align-items: center;
text-align: right;
}

.user-badge-wrapper,
.user-badge-wrapper .UserBadge-names {
overflow: hidden;
}
}
}

0 comments on commit 6fcacf7

Please sign in to comment.