Skip to content

Commit 0aad51a

Browse files
authored
fix(collection): Make namespace not overflow width, add title to sidebar items COMPASS-6106 (#3445)
1 parent 25c0e64 commit 0aad51a

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

packages/compass-collection/src/components/collection-header-actions/collection-header-actions.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const collectionHeaderActionsStyles = css({
1717
display: 'flex',
1818
marginLeft: 'auto',
1919
alignItems: 'center',
20+
overflow: 'hidden',
2021
});
2122

2223
const collectionHeaderActionsReadonlyStyles = css({

packages/compass-collection/src/components/collection-header/collection-header.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ const collectionHeaderStyles = css({
3434
const collectionHeaderTitleStyles = css({
3535
display: 'flex',
3636
alignItems: 'center',
37-
flex: '1 1 100%',
3837
padding: `0 ${String(spacing[3])}px`,
3938
margin: 0,
40-
width: '100%',
39+
overflow: 'hidden',
4140
});
4241

4342
const collectionHeaderDBLinkStyles = css({
@@ -51,7 +50,7 @@ const collectionHeaderDBLinkStyles = css({
5150
},
5251
backgroundColor: 'transparent',
5352
border: 'none',
54-
display: 'inline',
53+
display: 'inline-block',
5554
padding: 0,
5655
});
5756

@@ -69,12 +68,12 @@ const collectionHeaderNamespaceStyles = css({
6968
display: 'flex',
7069
whiteSpace: 'nowrap',
7170
overflow: 'hidden',
72-
textOverflow: 'ellipsis',
7371
});
7472

7573
const collectionHeaderDBNameStyles = css({
76-
display: 'flex',
77-
alignItems: 'center',
74+
overflow: 'hidden',
75+
textOverflow: 'ellipsis',
76+
whiteSpace: 'nowrap',
7877
});
7978

8079
const collectionHeaderDBNameLightStyles = css({

packages/compass-databases-navigation/src/collection-item.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ export const CollectionItem: React.FunctionComponent<
135135
{...hoverProps}
136136
>
137137
<CollectionIcon type={type} />
138-
<ItemLabel className={collectionItemLabel}>{name}</ItemLabel>
138+
<ItemLabel className={collectionItemLabel} title={name}>
139+
{name}
140+
</ItemLabel>
139141
<ItemActionControls<Actions>
140142
className={collectionActions}
141143
onAction={onAction}

packages/compass-databases-navigation/src/database-item.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ export const DatabaseItem: React.FunctionComponent<
181181
? databaseItemLabelNewSpacing
182182
: databaseItemLabelOldSpacing
183183
}
184+
title={name}
184185
>
185186
{name}
186187
</ItemLabel>

0 commit comments

Comments
 (0)