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

Proper ellipsis truncation of set names #443

Merged
merged 2 commits into from
Jan 28, 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
8 changes: 7 additions & 1 deletion packages/upset/src/components/custom/SetLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ type Props = {
name: string;
};

/**
* Label for the sets at the top of the membership matrix
*/
export const SetLabel: FC<Props> = ({ setId, name }) => {
const dimensions = useRecoilValue(dimensionsSelector);
const columnHover = useRecoilValue(columnHoverAtom);
Expand Down Expand Up @@ -45,7 +48,6 @@ export const SetLabel: FC<Props> = ({ setId, name }) => {
color: '#000000',
fontSize: '14px',
overflow: 'hidden',
textOverflow: 'ellipsis',
}}

>
Expand All @@ -55,6 +57,10 @@ export const SetLabel: FC<Props> = ({ setId, name }) => {
margin: '2px 0 0 0',
fontWeight: '500',
textAlign: 'start',
textOverflow: 'ellipsis',
overflow: 'hidden',
whiteSpace: 'nowrap',
width: dimensions.set.label.height - gap,
}}
>
{name}
Expand Down
Loading